Skip to contentSkip to conversation

tools/hotplug: xendomains.service conflicts with libvirt

PATCH Superseded Olaf Hering 3 participants 5 messages Oct 29, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/hotplug: xendomains.service conflicts with libvirt

xendomains will manage guests behind libvirts back:
- libvirt starts a guest
- that guest can be "managed" by libvirt and xl at the same time
- when xendomains runs on shutdown it will save the guest using xl libvirt does not know about this
- when xendomains runs on boot it will restore the saved guest using xl libvirt does not know about this, it will just fail to manage the restored guest

To prevent xendomains from interfering with libvirt add a Conflicts= to xendomains.service. It will cause libvirt to be stopped if xendomains is started manually with 'systemctl start'

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

---

This never went out via git send-email, sorry about this.

 tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xendomains.service.in +1 -0
index 66e2065..3875de1 100644
@@ -4,6 +4,7 @@ Requires=proc-xen.mount xenstored.service
 After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service
 After=network-online.target
 After=remote-fs.target
+Conflicts=libvirt.service
 ConditionPathExists=/proc/xen/capabilities
 
 [Service]
#1 lore raw
Quoted 31 lines · Olaf Hering

xendomains will manage guests behind libvirts back:
- libvirt starts a guest
- that guest can be "managed" by libvirt and xl at the same time
- when xendomains runs on shutdown it will save the guest using xl libvirt does not know about this
- when xendomains runs on boot it will restore the saved guest using xl libvirt does not know about this, it will just fail to manage the restored guest

To prevent xendomains from interfering with libvirt add a Conflicts= to xendomains.service. It will cause libvirt to be stopped if xendomains is started manually with 'systemctl start'

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

---

This never went out via git send-email, sorry about this.

 tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xendomains.service.in +0 -0
index 66e2065..3875de1 100644

tools/hotplug/Linux/systemd/xendomains.service.in Requires=proc-xen.mount xenstored.service · line 7

Quoted 4 lines
tools/hotplug/Linux/systemd/xendomains.service.in +1 -0
@@ -4,6 +4,7 @@ Requires=proc-xen.mount xenstored.service
 After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service
 After=network-online.target
 After=remote-fs.target
+Conflicts=libvirt.service

Is there a canonical source for the name of service? We should reference that in commit message.

My quick search on the Internet presents libvirtd.service as well. I fear the name of the service is up to distros, which means we shouldn't put one in xendomains.service.

Wei.

Quoted 3 lines
tools/hotplug/Linux/systemd/xendomains.service.in +0 -0
 ConditionPathExists=/proc/xen/capabilities
 
 [Service]
#2 lore raw
Quoted 4 lines · Wei Liu
Quoted 1 line · Olaf Hering

+Conflicts=libvirt.service

Is there a canonical source for the name of service? We should reference that in commit message.

No, its a typo. Thanks for spotting it.

The change which went into the xen package a few months ago uses libvirtd.service, which is also the name in libvirt.git. Just the variant of the change in my local copy of xen.git has the typo.

I just sent v2 of the change.

Olaf

#3 lore raw
In reply to Wei Liu
Quoted 39 lines · Wei Liu
Quoted 31 lines · Olaf Hering

xendomains will manage guests behind libvirts back:
- libvirt starts a guest
- that guest can be "managed" by libvirt and xl at the same time
- when xendomains runs on shutdown it will save the guest using xl libvirt does not know about this
- when xendomains runs on boot it will restore the saved guest using xl libvirt does not know about this, it will just fail to manage the restored guest

To prevent xendomains from interfering with libvirt add a Conflicts= to xendomains.service. It will cause libvirt to be stopped if xendomains is started manually with 'systemctl start'

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

---

This never went out via git send-email, sorry about this.

 tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xendomains.service.in +0 -0
index 66e2065..3875de1 100644

tools/hotplug/Linux/systemd/xendomains.service.in Requires=proc-xen.mount xenstored.service · line 7

Quoted 4 lines
tools/hotplug/Linux/systemd/xendomains.service.in +1 -0
@@ -4,6 +4,7 @@ Requires=proc-xen.mount xenstored.service
 After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service
 After=network-online.target
 After=remote-fs.target
+Conflicts=libvirt.service

Is there a canonical source for the name of service? We should reference that in commit message.

Quoted 3 lines

My quick search on the Internet presents libvirtd.service as well. I fear the name of the service is up to distros, which means we shouldn't put one in xendomains.service.

If it is a service file provided by libvirt upstream, we can probably get away with naming it explicitly.

If each distro write their own service files for libvirt, we probably can't.

~Andrew

#4 lore raw
Quoted 40 lines · Andrew Cooper
Quoted 39 lines · Wei Liu
Quoted 31 lines · Olaf Hering

xendomains will manage guests behind libvirts back:
- libvirt starts a guest
- that guest can be "managed" by libvirt and xl at the same time
- when xendomains runs on shutdown it will save the guest using xl libvirt does not know about this
- when xendomains runs on boot it will restore the saved guest using xl libvirt does not know about this, it will just fail to manage the restored guest

To prevent xendomains from interfering with libvirt add a Conflicts= to xendomains.service. It will cause libvirt to be stopped if xendomains is started manually with 'systemctl start'

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

---

This never went out via git send-email, sorry about this.

 tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xendomains.service.in +0 -0
index 66e2065..3875de1 100644

tools/hotplug/Linux/systemd/xendomains.service.in Requires=proc-xen.mount xenstored.service · line 7

Quoted 4 lines
tools/hotplug/Linux/systemd/xendomains.service.in +1 -0
@@ -4,6 +4,7 @@ Requires=proc-xen.mount xenstored.service
 After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service
 After=network-online.target
 After=remote-fs.target
+Conflicts=libvirt.service

Is there a canonical source for the name of service? We should reference that in commit message.

Quoted 7 lines
Quoted 3 lines

My quick search on the Internet presents libvirtd.service as well. I fear the name of the service is up to distros, which means we shouldn't put one in xendomains.service.

If it is a service file provided by libvirt upstream, we can probably get away with naming it explicitly.

Yes, that's also considered a "canonical source". :-)

Quoted 3 lines

If each distro write their own service files for libvirt, we probably can't.

~Andrew