commit e7dd2916893157854ca0fa5f4215d536151abbb3
Author: Mohammed Naser <email address hidden>
Date: Thu Mar 7 22:09:49 2019 -0500
restart: don't stop process on sighup when mutating
It seems that the code for handling SIGHUP currently calls stop()
on the service, then calls reset(), then calls start() on it again.
This is effectively a full service restart, which breaks the whole
point behind using SIGHUP for hot and quick reloads. It also breaks
our downstream projects in a few ways where they lose RPC on reload
due to the fact that they don't expect to have stop() called on a
reset().
This patch removes the stop and start when the restart_method is
set to 'mutate' because in that case we should just be signaling
the service to check for changes in its mutable config options.
It also changes the signal sent to children in that case to
SIGHUP, since SIGTERM will cause unnecessary restarts of child
processes.
The previous behavior is maintained for the 'reload' restart_method
since that does a complete reload of the service config, which is
not safe to do without restarting the service completely.
Change-Id: I86a34c22d41d87a9cce2d4ac6d95562d05823ecf
Closes-Bug: #1794708
Co-Authored-By: Ben Nemec <email address hidden>
Reviewed: https:/ /review. opendev. org/641907 /git.openstack. org/cgit/ openstack/ oslo.service/ commit/ ?id=e7dd2916893 157854ca0fa5f42 15d536151abbb3
Committed: https:/
Submitter: Zuul
Branch: master
commit e7dd29168931578 54ca0fa5f4215d5 36151abbb3
Author: Mohammed Naser <email address hidden>
Date: Thu Mar 7 22:09:49 2019 -0500
restart: don't stop process on sighup when mutating
It seems that the code for handling SIGHUP currently calls stop()
on the service, then calls reset(), then calls start() on it again.
This is effectively a full service restart, which breaks the whole
point behind using SIGHUP for hot and quick reloads. It also breaks
our downstream projects in a few ways where they lose RPC on reload
due to the fact that they don't expect to have stop() called on a
reset().
This patch removes the stop and start when the restart_method is
set to 'mutate' because in that case we should just be signaling
the service to check for changes in its mutable config options.
It also changes the signal sent to children in that case to
SIGHUP, since SIGTERM will cause unnecessary restarts of child
processes.
The previous behavior is maintained for the 'reload' restart_method
since that does a complete reload of the service config, which is
not safe to do without restarting the service completely.
Change-Id: I86a34c22d41d87 a9cce2d4ac6d955 62d05823ecf
Closes-Bug: #1794708
Co-Authored-By: Ben Nemec <email address hidden>