diff mbox series

[4/4] contrib: qemu-guest-agent.service: Use IgnoreOnIsolate=True

Message ID a4e48006fe2e705c40bea7a45c9142250dd63651.1625769000.git.crobinso@redhat.com
State New
Headers show
Series contrib: qemu-guest-agent.service updates | expand

Commit Message

Cole Robinson July 8, 2021, 6:32 p.m. UTC
Changing runlevel (telinit 3) will stop qemu-guest-agent.service, and
it won't ever restart, because it's intended to only start when the
specified virtio device is added.

Use IgnoreOnIsolate=True plus Install WantedBy= to keep the agent
running regardless of runlevel, which is the expected behavior IMO.

This has been in RHEL since 7.2ish timeframe:
https://bugzilla.redhat.com/show_bug.cgi?id=1165176

Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
 contrib/systemd/qemu-guest-agent.service | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/contrib/systemd/qemu-guest-agent.service b/contrib/systemd/qemu-guest-agent.service
index 505636a5ba..bb419fe55f 100644
--- a/contrib/systemd/qemu-guest-agent.service
+++ b/contrib/systemd/qemu-guest-agent.service
@@ -3,6 +3,7 @@  Description=QEMU Guest Agent
 Documentation=https://wiki.qemu.org/Features/GuestAgent
 BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
 After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
+IgnoreOnIsolate=True
 
 [Service]
 ExecStart=/usr/bin/qemu-ga
@@ -10,3 +11,4 @@  Restart=always
 RestartSec=0
 
 [Install]
+WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device