-
Notifications
You must be signed in to change notification settings - Fork 334
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
Dont restart/reload shinken with sudo #1488
Conversation
Need to test and validate, because a service is not done to be launch by a normal user. |
@naparuba I did, and it works. I was using ws-arbiter to reload/restart and it wouldn't work because shinken was not in the sudoers. Removing sudo fixed the issue. |
The main question is not about how to catch teh information, but how to On Wed, Feb 4, 2015 at 5:10 AM, Thibault Cohen notifications@github.com
|
It is in my opinion. Sending a signal to restart instead of killing does not require the same privileges right? I think the idea here is to avoid the sudo issue by only sending signals. |
yes it's a bonus indeed, but it will be the only gain as we don't have a But after all with the "host addition" we can look at why not "reinject" On Wed, Feb 4, 2015 at 1:41 PM, Sébastien Coavoux notifications@github.com
|
if it's only to allow changes to hosts/services/contacts/etc configurations then it should be rather easy to do it in a way that would(should)n't impact (too heavily I mean) anything. In the Arbiter.run() method (which contains the "deepest main" loop of arbiter main thread): but yes untested on my side what could be a problem is the arbiter modules -> if they have internally linked to the arbiter conf (module.my_bind_of_conf = arbiter.conf) for some reason then they will continue to use the previous conf, which would be completely bad ofcourse and in this case then we would probably need to replace the config "in place", that is no "arbiter.conf = new_conf" but some kind of "arbiter.conf.replace_with(new_conf)" ;; not sure that this is the case / is even possible in fact or anyway. |
I mean not sure that a shinken arbiter module can do bind itself directly to the arbiter.conf. |
IMO this fix is legit. The sudo is important if you use the OS start system (service..) but here we directly call the init script that should be executable by shinken / any user. That's how script are chmoded in init.d usually (ref : a newly setup debian server) |
Merging this. Sudo command will mostly fail because it has no tty if you dont configure the sudoers not to ask for it. |
Fix: Dont restart/reload shinken with sudo
sudo should not be needed by the shinken user.
In my case, shinken was not in the sudoers so the command did not work.