* [PATCH] tools/hotplug: xendomains.service conflicts with libvirt
@ 2015-10-29 10:22 Olaf Hering
2015-10-29 10:29 ` Wei Liu
0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2015-10-29 10:22 UTC (permalink / raw)
To: xen-devel
Cc: Wei Liu, Olaf Hering, Ian Jackson, Ian Campbell,
Stefano Stabellini
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'
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
This never went out via git send-email, sorry about this.
tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in
index 66e2065..3875de1 100644
--- a/tools/hotplug/Linux/systemd/xendomains.service.in
+++ b/tools/hotplug/Linux/systemd/xendomains.service.in
@@ -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]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: xendomains.service conflicts with libvirt
2015-10-29 10:22 [PATCH] tools/hotplug: xendomains.service conflicts with libvirt Olaf Hering
@ 2015-10-29 10:29 ` Wei Liu
2015-10-29 11:06 ` Olaf Hering
2015-10-29 11:07 ` Andrew Cooper
0 siblings, 2 replies; 5+ messages in thread
From: Wei Liu @ 2015-10-29 10:29 UTC (permalink / raw)
To: Olaf Hering
Cc: Wei Liu, Stefano Stabellini, Ian Jackson, Ian Campbell, xen-devel
On Thu, Oct 29, 2015 at 10:22:45AM +0000, Olaf Hering wrote:
> 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'
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>
> This never went out via git send-email, sorry about this.
>
>
> tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in
> index 66e2065..3875de1 100644
> --- a/tools/hotplug/Linux/systemd/xendomains.service.in
> +++ b/tools/hotplug/Linux/systemd/xendomains.service.in
> @@ -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.
> ConditionPathExists=/proc/xen/capabilities
>
> [Service]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: xendomains.service conflicts with libvirt
2015-10-29 10:29 ` Wei Liu
@ 2015-10-29 11:06 ` Olaf Hering
2015-10-29 11:07 ` Andrew Cooper
1 sibling, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2015-10-29 11:06 UTC (permalink / raw)
To: Wei Liu; +Cc: Stefano Stabellini, Ian Jackson, Ian Campbell, xen-devel
On Thu, Oct 29, Wei Liu wrote:
> On Thu, Oct 29, 2015 at 10:22:45AM +0000, Olaf Hering wrote:
> > +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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: xendomains.service conflicts with libvirt
2015-10-29 10:29 ` Wei Liu
2015-10-29 11:06 ` Olaf Hering
@ 2015-10-29 11:07 ` Andrew Cooper
2015-10-29 11:09 ` Wei Liu
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-10-29 11:07 UTC (permalink / raw)
To: Wei Liu, Olaf Hering
Cc: xen-devel, Ian Jackson, Ian Campbell, Stefano Stabellini
On 29/10/15 10:29, Wei Liu wrote:
> On Thu, Oct 29, 2015 at 10:22:45AM +0000, Olaf Hering wrote:
>> 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'
>>
>> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>> Cc: Ian Campbell <ian.campbell@citrix.com>
>> Cc: Wei Liu <wei.liu2@citrix.com>
>> ---
>>
>> This never went out via git send-email, sorry about this.
>>
>>
>> tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in
>> index 66e2065..3875de1 100644
>> --- a/tools/hotplug/Linux/systemd/xendomains.service.in
>> +++ b/tools/hotplug/Linux/systemd/xendomains.service.in
>> @@ -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.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: xendomains.service conflicts with libvirt
2015-10-29 11:07 ` Andrew Cooper
@ 2015-10-29 11:09 ` Wei Liu
0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2015-10-29 11:09 UTC (permalink / raw)
To: Andrew Cooper
Cc: Olaf Hering, Wei Liu, Ian Campbell, Stefano Stabellini,
Ian Jackson, xen-devel
On Thu, Oct 29, 2015 at 11:07:22AM +0000, Andrew Cooper wrote:
> On 29/10/15 10:29, Wei Liu wrote:
> > On Thu, Oct 29, 2015 at 10:22:45AM +0000, Olaf Hering wrote:
> >> 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'
> >>
> >> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> >> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> >> Cc: Ian Campbell <ian.campbell@citrix.com>
> >> Cc: Wei Liu <wei.liu2@citrix.com>
> >> ---
> >>
> >> This never went out via git send-email, sorry about this.
> >>
> >>
> >> tools/hotplug/Linux/systemd/xendomains.service.in | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in
> >> index 66e2065..3875de1 100644
> >> --- a/tools/hotplug/Linux/systemd/xendomains.service.in
> >> +++ b/tools/hotplug/Linux/systemd/xendomains.service.in
> >> @@ -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.
>
> 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". :-)
> If each distro write their own service files for libvirt, we probably can't.
>
> ~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-29 11:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 10:22 [PATCH] tools/hotplug: xendomains.service conflicts with libvirt Olaf Hering
2015-10-29 10:29 ` Wei Liu
2015-10-29 11:06 ` Olaf Hering
2015-10-29 11:07 ` Andrew Cooper
2015-10-29 11:09 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.