Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodehealth.py - get_ipaddress in 0.3.0 #21

Open
sbkirby opened this issue Jan 9, 2021 · 1 comment
Open

nodehealth.py - get_ipaddress in 0.3.0 #21

sbkirby opened this issue Jan 9, 2021 · 1 comment

Comments

@sbkirby
Copy link
Contributor

sbkirby commented Jan 9, 2021

Hey Jeff,
I've loaded 0.3.0, and I have a question about valid_prefix in the function get_ipaddress of nodehealth.py. According the commented portion of line 115 we are supposed to edit that line to our IP address...Is that correct?

Do I need to do anything else for version 0.3.0?

Stephen B Kirby

@jeffbass
Copy link
Owner

jeffbass commented Jan 9, 2021

Hi Stephen,

Yes, setting valid_prefix in the function get_ipaddress of nodehealth.py should be the only change you need to make to get the new 0.3.0 version of imagenode working versus the old one. Sorry, I should have documented that. I listed the new restart event message in HISTORY.md for 0.3.0. The ip_address_prefix will become an optional YAML item in the node: section. It is part of preparing the imagenode and imagehub code for pushing the my first librarian version to GitHub. To help the librarian monitor the status of all the imagenodes, I've added a 'Restart' event message to imagnode. It sends a multi-field message each time the imagenode starts or restarts. The message looks like this:

2021-01-09 07:59:11,802 ~ Barn|Restart|rpi12|RPi|192.168.86.121|860|290.87

where the fields after the word Restart are imagenode characteristics helpful to the librarian:

   ...   |Restart| <<localhost name>> | <<system type>>  | <<ip address>> | <<RAM size>> | << time since last restart >>

The plan is to add a YAML option named ip_address_prefix and document it. If it is not provided, something (TBD) will be substituted for the ip address in the restart message. The code in the function get_ipaddress returns an externally usable ip address in numeric format.

This new restart message appears in the imagehub event messages logs. I also changed the imagehub log rotation schedule. The change is described in imagehub issue # 4. Again, I apologize for not documenting this 'half built' code change. I am interating changes simultaneously in imagenode, imagehub and librarian so I can get the first push of librarian done.

If you catch any other issues with 0.3.0, please post them. I'll leave this issue open until I've got the ip_address_prefix YAML option built and documented. If you want to set up a first draft of the new ip_address_prefix in settings and document them in a pull request, that would be helpful. I won't get to that for a while. And I still need to decide what I want to do when an ip address prefix is not provided. I definitely want it to be optional, but need to put something in the restart message. Maybe just 'None' for now.
Thanks,
Jeff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants