* [PATCH] tools/hotplug: Don't ever kill xenstored
@ 2015-02-23 9:18 Ross Lagerwall
2015-02-23 16:19 ` Wei Liu
2015-02-24 7:54 ` Olaf Hering
0 siblings, 2 replies; 5+ messages in thread
From: Ross Lagerwall @ 2015-02-23 9:18 UTC (permalink / raw)
To: xen-devel
Cc: Olaf Hering, Wei Liu, Ian Campbell, Stefano Stabellini,
Ian Jackson, Ross Lagerwall
Don't kill xenstored as part of the usual service shutdown process to
prevent hangs on shutdown where the kernel tries to unplug a VIF
after xenstored has exited.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
index 0f0ac58..a5f836b 100644
--- a/tools/hotplug/Linux/systemd/xenstored.service.in
+++ b/tools/hotplug/Linux/systemd/xenstored.service.in
@@ -8,6 +8,7 @@ ConditionPathExists=/proc/xen/capabilities
[Service]
Type=notify
+KillMode=none
Environment=XENSTORED_ARGS=
Environment=XENSTORED=@XENSTORED@
EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: Don't ever kill xenstored
2015-02-23 9:18 [PATCH] tools/hotplug: Don't ever kill xenstored Ross Lagerwall
@ 2015-02-23 16:19 ` Wei Liu
2015-02-23 17:01 ` Andrew Cooper
2015-02-24 7:54 ` Olaf Hering
1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-02-23 16:19 UTC (permalink / raw)
To: Ross Lagerwall
Cc: Olaf Hering, Wei Liu, Ian Campbell, Stefano Stabellini,
Ian Jackson, xen-devel
On Mon, Feb 23, 2015 at 09:18:49AM +0000, Ross Lagerwall wrote:
> Don't kill xenstored as part of the usual service shutdown process to
> prevent hangs on shutdown where the kernel tries to unplug a VIF
> after xenstored has exited.
>
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Do you run xendomains service? Aren't all guests shutdown by that
service? And according to the dependency configuration, xenstored should
not shutdown before xendomains is done?
Wei.
> ---
> tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
> index 0f0ac58..a5f836b 100644
> --- a/tools/hotplug/Linux/systemd/xenstored.service.in
> +++ b/tools/hotplug/Linux/systemd/xenstored.service.in
> @@ -8,6 +8,7 @@ ConditionPathExists=/proc/xen/capabilities
>
> [Service]
> Type=notify
> +KillMode=none
> Environment=XENSTORED_ARGS=
> Environment=XENSTORED=@XENSTORED@
> EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
> --
> 2.1.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: Don't ever kill xenstored
2015-02-23 16:19 ` Wei Liu
@ 2015-02-23 17:01 ` Andrew Cooper
2015-02-23 17:25 ` Wei Liu
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-02-23 17:01 UTC (permalink / raw)
To: Wei Liu, Ross Lagerwall
Cc: Olaf Hering, xen-devel, Ian Jackson, Ian Campbell,
Stefano Stabellini
On 23/02/15 16:19, Wei Liu wrote:
> On Mon, Feb 23, 2015 at 09:18:49AM +0000, Ross Lagerwall wrote:
>> Don't kill xenstored as part of the usual service shutdown process to
>> prevent hangs on shutdown where the kernel tries to unplug a VIF
>> after xenstored has exited.
>>
>> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> Do you run xendomains service? Aren't all guests shutdown by that
> service? And according to the dependency configuration, xenstored should
> not shutdown before xendomains is done?
We do not run the xendomains service. (It also doesn't necessarily shut
all domains down.)
In an ideal case with all guests cooperating, they are all shut down by
this point.
However in the uncooperative case, malicious or crashed guests, or dom0
configuration errors must not be able to block shutdown/reboot of dom0.
Xenstored has no state to sync to disk, and never used to be killed in
the sysvinit case; observe the warning in xencommons. Our testing has
shown regressions caused by the change in behaviour between sysvinit and
systemd when it comes to killing xenstored.
~Andrew
>
> Wei.
>
>> ---
>> tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
>> index 0f0ac58..a5f836b 100644
>> --- a/tools/hotplug/Linux/systemd/xenstored.service.in
>> +++ b/tools/hotplug/Linux/systemd/xenstored.service.in
>> @@ -8,6 +8,7 @@ ConditionPathExists=/proc/xen/capabilities
>>
>> [Service]
>> Type=notify
>> +KillMode=none
>> Environment=XENSTORED_ARGS=
>> Environment=XENSTORED=@XENSTORED@
>> EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
>> --
>> 2.1.0
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: Don't ever kill xenstored
2015-02-23 17:01 ` Andrew Cooper
@ 2015-02-23 17:25 ` Wei Liu
0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2015-02-23 17:25 UTC (permalink / raw)
To: Andrew Cooper
Cc: Olaf Hering, Wei Liu, Ian Campbell, Stefano Stabellini,
Ian Jackson, xen-devel, Ross Lagerwall
On Mon, Feb 23, 2015 at 05:01:19PM +0000, Andrew Cooper wrote:
> On 23/02/15 16:19, Wei Liu wrote:
> > On Mon, Feb 23, 2015 at 09:18:49AM +0000, Ross Lagerwall wrote:
> >> Don't kill xenstored as part of the usual service shutdown process to
> >> prevent hangs on shutdown where the kernel tries to unplug a VIF
> >> after xenstored has exited.
> >>
> >> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> > Do you run xendomains service? Aren't all guests shutdown by that
> > service? And according to the dependency configuration, xenstored should
> > not shutdown before xendomains is done?
>
> We do not run the xendomains service. (It also doesn't necessarily shut
> all domains down.)
>
> In an ideal case with all guests cooperating, they are all shut down by
> this point.
>
> However in the uncooperative case, malicious or crashed guests, or dom0
> configuration errors must not be able to block shutdown/reboot of dom0.
>
> Xenstored has no state to sync to disk, and never used to be killed in
> the sysvinit case; observe the warning in xencommons. Our testing has
> shown regressions caused by the change in behaviour between sysvinit and
> systemd when it comes to killing xenstored.
>
I think the above reasoning should end up in the commit message.
Wei.
> ~Andrew
>
> >
> > Wei.
> >
> >> ---
> >> tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
> >> index 0f0ac58..a5f836b 100644
> >> --- a/tools/hotplug/Linux/systemd/xenstored.service.in
> >> +++ b/tools/hotplug/Linux/systemd/xenstored.service.in
> >> @@ -8,6 +8,7 @@ ConditionPathExists=/proc/xen/capabilities
> >>
> >> [Service]
> >> Type=notify
> >> +KillMode=none
> >> Environment=XENSTORED_ARGS=
> >> Environment=XENSTORED=@XENSTORED@
> >> EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
> >> --
> >> 2.1.0
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/hotplug: Don't ever kill xenstored
2015-02-23 9:18 [PATCH] tools/hotplug: Don't ever kill xenstored Ross Lagerwall
2015-02-23 16:19 ` Wei Liu
@ 2015-02-24 7:54 ` Olaf Hering
1 sibling, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2015-02-24 7:54 UTC (permalink / raw)
To: Ross Lagerwall
Cc: Ian Jackson, Stefano Stabellini, Wei Liu, Ian Campbell, xen-devel
On Mon, Feb 23, Ross Lagerwall wrote:
> Don't kill xenstored as part of the usual service shutdown process to
> prevent hangs on shutdown where the kernel tries to unplug a VIF
> after xenstored has exited.
Likely ok, if KillMode= is supported with at least systemd 208.
http://www.freedesktop.org/software/systemd/man/systemd.kill.html
Olaf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-24 7:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 9:18 [PATCH] tools/hotplug: Don't ever kill xenstored Ross Lagerwall
2015-02-23 16:19 ` Wei Liu
2015-02-23 17:01 ` Andrew Cooper
2015-02-23 17:25 ` Wei Liu
2015-02-24 7:54 ` Olaf Hering
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.