With upstart, after you changed an option in /etc/init/.conf, it is not enough to run “restart ”. You would have to stop and start the service for the change to take effect, as documented in initctl(8) on Ubuntu 12.04.
How would I do so in an ansible handler? The following handler does not do it:
What ansible version are you using?
ansible --version
ansible 1.1 from git tag release1.1
By the way, for now I’m using
Could it be that just this one service does not support restart?
I am fine with doing start+stop, but it seems restart is a command.
restart IS part of upstart
Ah, nvmd, I see the issue.
upstart’s restart will restart the service with the original config (won’t reread) so if you are updating the config you NEED to issue a separate stop + start to get it restarted with the new config … dumb upstart!
Based on my reading of this he’s saying that restart is fine UNLESS you edit the actual upstart job itself and then restart doesn’t reload that off disk and see the changes. Is that accurate?
So the upstart config file got templated also? I concur, dumb upstart!
The SysV code does explicit stop/start somewhat for this reason.
I’m fine with patches to make it do the same.
Yes.
I think there is no room here to be smart and detect whichever method is needed, so let the user choose.
How about a userestart=yes/no option that defaults to no?
Yes. Seems upstart does not meet many people’s expectations here.
At this point feels like restart_mode as httpd may like “graceful” as well.
– Michael