-
Notifications
You must be signed in to change notification settings - Fork 63
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
Implemented: Adding configuration for start and reload (#364) #370
base: master
Are you sure you want to change the base?
Conversation
Thanks for sending this is. We used to have something similar in the past although for restarts, however it was removed (see references below). The past is messy though, and it seems it was never removed for systemd, even though that was probably intended. The reason at that time, is that for very large systems, reload/restarts/verify-config can take a significant amount of time. Bundling verify-config with the systemd/service commands makes it hard for a user/other software to make a choice what you want to prioritize. I.e. there is nothing stopping you today from running a verify config yourselves before doing the I personally don't have a strong opinion on the subject (and we ship our own systemd files anyway), but it's not entirely clear to me what the "correct" / "best" approach is. |
What's the problem to check the scale, the size of naemon installation and to perform the check at the restart when number of services/hosts/etc is not greater than X? |
The problem is, this will add a random and arbitrary boundary at which reloads/restart behave differently. I would consider this a standard workflow, you change something, you run a config check and if thats sucessful, do a reload. In OMD we have a special environment variable |
Maybe just add the parameter in Naemon configuration? |
I think that sounds like a great solution 👍 |
I think that's not so easy to implement as we'd need to parse the config file somehow then (i.e in the systemd/service files). It would be much simpler to implement with an environment variable. |
I think this would be useful for users that are not working with Naemon all day long :) To be fair, I guess most of us are using some tool to generate the Naemon config files for us. I don't think that @jacobbaungard or @sni are messing around with config files anymore. I also assume that the power users are using own systemd services anyway. Mine for example does a config check:
Also the config generator is running a validation before reloading Naemon: On my test system with 5024 hosts and 93363 services the verification takes 2.5 seconds. In my opinion a config validation should be enabled by default. Users with such big setups where the verification takes too long have enough experience to disable the verification, or are already using own systemd service configurations anyway. |
OK for me as long as it's easy to disable with i.e an env var. You have any preference for default behaviour @sni ? |
its fine for me if the default is enabled. As long as its easy to disable. |
That sounds great. |
Any news on this one? And could you please rebase onto the latest upstream? thanks |
This pull request adds a config check before reloading/starting naemon. The implementation is done in the systemd unit and the init script. If the config check throws an error, reloading/starting will be aborted.