[libvirt] [PATCH] virtlogd: Don't stop or restart along with libvirtd

Commit 839a060 tied the lifecycle of virtlogd more closely to that of libvirtd. Unfortunately, while starting virtlogd when libvirtd is started is definitely a good idea, restarting virtlogd or shutting it down at any time outside of system poweroff is not. Revert part of that commit by removing the PartOf= lines, meaning that only startup requests will be propagated from libvirtd to virtlogd. Resolves: https://bugzilla.redhat.com/1372576 --- src/logging/virtlogd.service.in | 1 - src/logging/virtlogd.socket.in | 1 - 2 files changed, 2 deletions(-) diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in index 8287994..09e0740 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -2,7 +2,6 @@ Description=Virtual machine log manager Requires=virtlogd.socket Before=libvirtd.service -PartOf=libvirtd.service Documentation=man:virtlogd(8) Documentation=http://libvirt.org diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in index efb6504..22b9360 100644 --- a/src/logging/virtlogd.socket.in +++ b/src/logging/virtlogd.socket.in @@ -1,7 +1,6 @@ [Unit] Description=Virtual machine log manager socket Before=libvirtd.service -PartOf=libvirtd.service [Socket] ListenStream=@localstatedir@/run/libvirt/virtlogd-sock -- 2.7.4

On Tue, Sep 20, 2016 at 03:29:59PM +0200, Andrea Bolognani wrote:
Commit 839a060 tied the lifecycle of virtlogd more closely to that of libvirtd. Unfortunately, while starting virtlogd when libvirtd is started is definitely a good idea, restarting virtlogd or shutting it down at any time outside of system poweroff is not.
Revert part of that commit by removing the PartOf= lines, meaning that only startup requests will be propagated from libvirtd to virtlogd.
Resolves: https://bugzilla.redhat.com/1372576 --- src/logging/virtlogd.service.in | 1 - src/logging/virtlogd.socket.in | 1 - 2 files changed, 2 deletions(-)
diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in index 8287994..09e0740 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -2,7 +2,6 @@ Description=Virtual machine log manager Requires=virtlogd.socket Before=libvirtd.service -PartOf=libvirtd.service Documentation=man:virtlogd(8) Documentation=http://libvirt.org
diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in index efb6504..22b9360 100644 --- a/src/logging/virtlogd.socket.in +++ b/src/logging/virtlogd.socket.in @@ -1,7 +1,6 @@ [Unit] Description=Virtual machine log manager socket Before=libvirtd.service -PartOf=libvirtd.service
[Socket] ListenStream=@localstatedir@/run/libvirt/virtlogd-sock
ACK FYI, systemd docs say PartOf= Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one-way dependency — changes to this unit do not affect the listed units. we clearly don't want 'restart' propagated to virtlogd or virtlockd - those units must only ever 'reexec' themselves. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, 2016-09-20 at 14:35 +0100, Daniel P. Berrange wrote:
ACK
Pushed, thanks.
FYI, systemd docs say PartOf= Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one-way dependency — changes to this unit do not affect the listed units. we clearly don't want 'restart' propagated to virtlogd or virtlockd - those units must only ever 'reexec' themselves.
I was aware of that; however, I failed to understand that virtlogd must never be restarted this way. Thankfully downstream QE caught the faulty commit before it could make it into a release :) -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrange