Hi,
This patch series fixes up a few problems encountered while testing out
virtlockd.
The biggest problem was that reloading virtlockd through systemd or its
initscript would send it a SIGHUP, not a SIGUSR1 (which causes it to re-exec
itself). This would simply kill it. Patches 1-3 clean this up by having SIGHUP
behave the same as SIGUSR1. The systemd unit and initscript have to use
SIGUSR1, though, since they may be called upon to signal an old virtlockd
binary.
When run from the initscript graceful re-exec didn't work properly anyway, as
virtlockd assumed argv[0] was a full path to its binary. The initscript didn't
provide a full path. Patches 4-5 make virtlockd use execvp() to re-exec itself,
which does a PATH lookup if necessary.
Patch 6 isn't really virtlockd-specific. It moves the reloading of virtlockd
and libvirtd via initscripts into the libvirt-daemon package's %postun
scriptlet (which is already where reloading is done with systemd). The problem
with reloading libvirt-daemon in %post is that it restarts *before* all of the
libvirt-daemon-driver-* packages have been updated in the same RPM transaction,
which means it keeps using the old libraries (or fails to load them due to
missing symbols).
Michael Chapman (6):
virtlockd: improve systemd units
virtlockd: improve initscripts
virtlockd: treat SIGHUP like SIGUSR1
virtlockd: use common exit path when out-of-memory
virtlockd: make re-exec more robust
spec: clean up libvirtd and virtlockd service mgmt
daemon/libvirtd.init.in | 2 ++
libvirt.spec.in | 43 +++++++++++-----------
src/locking/lock_daemon.c | 77 ++++++++++++++++++++++++++++++----------
src/locking/virtlockd.init.in | 11 +++---
src/locking/virtlockd.service.in | 7 ++--
src/locking/virtlockd.socket.in | 2 +-
6 files changed, 95 insertions(+), 47 deletions(-)
--
1.8.4.2