[SRU] Service restart fails because process has not exited
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
puppetmaster (Ubuntu) |
Fix Released
|
Undecided
|
Felipe Reyes | ||
Trusty |
Fix Released
|
Undecided
|
Felipe Reyes | ||
Utopic |
Fix Released
|
Undecided
|
Felipe Reyes |
Bug Description
[Impact]
Users restarting puppet and puppetmaster may have problems restarting the
daemons, in systems under heavy load may be more frequent, because if the stop
operation takes more than 1 second the start operation fails due that the
daemon is still running.
If the daemon isn't started in a machine managed by puppet (or the
puppetmaster) will require manual intervention to bring up the system.
[Test]
- Create a small VM (512MB, 1 vcpu)
- Install puppet and puppetmaster packages
- Restart each daemon twice with a 10 seconds pause
# service puppetmaster restart; sleep 10; service puppetmaster restart
Expected results:
- The service is restarted
Actual results:
- The service is stopped, but it isn't started again the console prints:
root@vivid-
* Restarting puppet master
...done.
* Restarting puppet master
...fail!
[Regression Potential]
- If after 10 seconds the daemon isn't exited the start-stop-daemon command
will send the KILL signal and wait for 5 seconds, this is different from the
current behavior that just informs the restart failure to the user and
doesn't send the KILL signal.
[Other Info]
When restarting the puppetmaster process (via the service command, or calling
the initscript directly), the restart can fail if the original process does
not exit immediately. This is because the initscript is not written to wait
for the original process to exit.
In my testing under Trusty, adding "-R n" to the start-stop-daemon command in
the initscript fixed the problem. It's difficult to determine an appropriate
value for n, but it could be tunable via /etc/default/
definitely a problem not to wait at all for the process to exit.
description: | updated |
description: | updated |
Changed in puppetmaster (Ubuntu Trusty): | |
status: | New → Fix Released |
Changed in puppetmaster (Ubuntu Utopic): | |
status: | New → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.