|
|
6ae9ed |
From 19c4be54e82a58129448cbc56fbf2cc579b5ab29 Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <19c4be54e82a58129448cbc56fbf2cc579b5ab29@dist-git>
|
|
|
6ae9ed |
From: Andrea Bolognani <abologna@redhat.com>
|
|
|
6ae9ed |
Date: Tue, 6 Sep 2016 16:42:23 +0200
|
|
|
6ae9ed |
Subject: [PATCH] virtlogd.socket: Tie lifecycle to libvirtd.service
|
|
|
6ae9ed |
|
|
|
6ae9ed |
We already guarantee that virtlogd.socket is enabled/disabled
|
|
|
6ae9ed |
along with libvirtd.service, but if libvirtd.service has just
|
|
|
6ae9ed |
been installed and is started before rebooting, then
|
|
|
6ae9ed |
virtlogd.socket will not be running and guest startup will
|
|
|
6ae9ed |
fail.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Add Requires=virtlogd.socket to libvirtd.service to make sure
|
|
|
6ae9ed |
virtlogd.socket is always started along with libvirtd.service,
|
|
|
6ae9ed |
and add Before=libvirtd.service to both virtlogd.socket and
|
|
|
6ae9ed |
virtlogd.service so that virtlogd never disappears before
|
|
|
6ae9ed |
libvirtd has exited.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Also add PartOf=libvirtd.service to both virtlogd.socket and
|
|
|
6ae9ed |
virtlogd.service, so that virtlogd can be shut down when not
|
|
|
6ae9ed |
needed.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Resolves: https://bugzilla.redhat.com/1372576
|
|
|
6ae9ed |
(cherry picked from commit 839a060890d8b2408c0ea20e3c5997c7b2a4a079)
|
|
|
6ae9ed |
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
daemon/libvirtd.service.in | 1 +
|
|
|
6ae9ed |
src/logging/virtlogd.service.in | 2 ++
|
|
|
6ae9ed |
src/logging/virtlogd.socket.in | 2 ++
|
|
|
6ae9ed |
3 files changed, 5 insertions(+)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
|
|
|
6ae9ed |
index 1616e7a..bbf27da 100644
|
|
|
6ae9ed |
--- a/daemon/libvirtd.service.in
|
|
|
6ae9ed |
+++ b/daemon/libvirtd.service.in
|
|
|
6ae9ed |
@@ -5,6 +5,7 @@
|
|
|
6ae9ed |
|
|
|
6ae9ed |
[Unit]
|
|
|
6ae9ed |
Description=Virtualization daemon
|
|
|
6ae9ed |
+Requires=virtlogd.socket
|
|
|
6ae9ed |
Before=libvirt-guests.service
|
|
|
6ae9ed |
After=network.target
|
|
|
6ae9ed |
After=dbus.service
|
|
|
6ae9ed |
diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
|
|
|
6ae9ed |
index a264d3a..8287994 100644
|
|
|
6ae9ed |
--- a/src/logging/virtlogd.service.in
|
|
|
6ae9ed |
+++ b/src/logging/virtlogd.service.in
|
|
|
6ae9ed |
@@ -1,6 +1,8 @@
|
|
|
6ae9ed |
[Unit]
|
|
|
6ae9ed |
Description=Virtual machine log manager
|
|
|
6ae9ed |
Requires=virtlogd.socket
|
|
|
6ae9ed |
+Before=libvirtd.service
|
|
|
6ae9ed |
+PartOf=libvirtd.service
|
|
|
6ae9ed |
Documentation=man:virtlogd(8)
|
|
|
6ae9ed |
Documentation=http://libvirt.org
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in
|
|
|
6ae9ed |
index 724976d..efb6504 100644
|
|
|
6ae9ed |
--- a/src/logging/virtlogd.socket.in
|
|
|
6ae9ed |
+++ b/src/logging/virtlogd.socket.in
|
|
|
6ae9ed |
@@ -1,5 +1,7 @@
|
|
|
6ae9ed |
[Unit]
|
|
|
6ae9ed |
Description=Virtual machine log manager socket
|
|
|
6ae9ed |
+Before=libvirtd.service
|
|
|
6ae9ed |
+PartOf=libvirtd.service
|
|
|
6ae9ed |
|
|
|
6ae9ed |
[Socket]
|
|
|
6ae9ed |
ListenStream=@localstatedir@/run/libvirt/virtlogd-sock
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.10.0
|
|
|
6ae9ed |
|