Skip to contentSkip to conversation

tools/hotplug: Don't ever kill xenstored

PATCH Superseded Ross Lagerwall 4 participants 5 messages Feb 23, 2015 – Feb 24, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/hotplug: Don't ever kill xenstored

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.

---
 tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xenstored.service.in +1 -0
index 0f0ac58..a5f836b 100644
@@ -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
Signature · 1 line
2.1.0
#1 lore raw
Quoted 5 lines · 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.

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.

Quoted 18 lines
---
 tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xenstored.service.in +1 -0
index 0f0ac58..a5f836b 100644
@@ -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
Signature · 1 line
2.1.0
#2 lore raw
Quoted 9 lines · Wei Liu
Quoted 5 lines · 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.

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

Quoted 25 lines

Wei.

Quoted 18 lines
---
 tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xenstored.service.in +1 -0
index 0f0ac58..a5f836b 100644
@@ -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
Signature · 1 line
2.1.0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 17 lines · Andrew Cooper
Quoted 9 lines · Wei Liu
Quoted 5 lines · 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.

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.

Quoted 8 lines

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.

Quoted 28 lines

~Andrew

Quoted 25 lines

Wei.

Quoted 18 lines
---
 tools/hotplug/Linux/systemd/xenstored.service.in | 1 +
 1 file changed, 1 insertion(+)
tools/hotplug/Linux/systemd/xenstored.service.in +1 -0
index 0f0ac58..a5f836b 100644
@@ -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
Signature · 1 line
2.1.0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel