-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add an option run checks only and exit #372
Conversation
Didn't we discuss (2) and end up with "this introduces a chicken-egg situation, where people want to run checks before they upgrade, but the new checks require the new installer to be present"? I'm cool with the feature as such, just wonder if we're really getting (2) out of it. |
Correct - this won't help with new checks in the installer. I was thinking about existing checks that are more persistent? Specifically, I have seen multiple requests to have foreman-maintain health check do a hostname check. I suppose I could just copy that code into foreman-maintain but thought I'd consider this route first and see what others think. |
Oh, okay, that it would help with. |
@ekohl Any thoughts to adding this feature? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this makes sense. Some small implementation details inline.
lib/kafo/kafo_configure.rb
Outdated
self.class.exit(:invalid_system) | ||
else | ||
logger.notice("System checks passed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd argue this is info
, not notice
. https://en.wikipedia.org/wiki/Syslog#Severity_level says for notice:
Conditions that are not error conditions, but that may require special handling.
And info:
Confirmation that the program is working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem we always have is that we had to use NOTICE because of how puppet uses INFO and that forced our hand to break some of these rules in order to provide users with useful information. Notice is our default, and I believe that this is a useful output for default state, especially when running checks only or the output feels like nothing actually happened:
2024-04-18 14:08:27 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-04-18 14:08:32 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-04-18 14:08:32 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-04-18 14:08:33 [NOTICE] [checks] System checks passed
vs.
2024-04-18 14:08:27 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-04-18 14:08:32 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-04-18 14:08:32 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
34d7d23
to
713d777
Compare
The intent is to at least allow two scenarios: