* [PATCH] tools/hotplug: Add native systemd xendriverdomain.service
@ 2016-07-03 3:33 Rusty Bird
2016-07-07 12:04 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Rusty Bird @ 2016-07-03 3:33 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Ian Jackson, Rusty Bird
Uses ConditionVirtualization=xen, which evaluates to false in dom0 since
systemd 214 (released 2014-06-11). An alternative would be this line:
ExecStartPre=/bin/sh -c "! grep -q control_d /proc/xen/capabilities"
(Please rerun autogen.sh)
Signed-off-by: Rusty Bird <rustybird@openmailbox.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
tools/configure.ac | 1 +
tools/hotplug/Linux/systemd/Makefile | 1 +
tools/hotplug/Linux/systemd/xendriverdomain.service.in | 14 ++++++++++++++
3 files changed, 16 insertions(+)
create mode 100644 tools/hotplug/Linux/systemd/xendriverdomain.service.in
diff --git a/tools/configure.ac b/tools/configure.ac
index 8704927..e08fa8e 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -437,6 +437,7 @@ AS_IF([test "x$systemd" = "xy"], [
hotplug/Linux/systemd/xenconsoled.service
hotplug/Linux/systemd/xendomains.service
hotplug/Linux/systemd/xenstored.service
+ hotplug/Linux/systemd/xendriverdomain.service
hotplug/Linux/systemd/xenstored.socket
hotplug/Linux/systemd/xenstored_ro.socket
])
diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
index 83e3b32..558e459 100644
--- a/tools/hotplug/Linux/systemd/Makefile
+++ b/tools/hotplug/Linux/systemd/Makefile
@@ -15,6 +15,7 @@ XEN_SYSTEMD_SERVICE += xen-qemu-dom0-disk-backend.service
XEN_SYSTEMD_SERVICE += xendomains.service
XEN_SYSTEMD_SERVICE += xen-watchdog.service
XEN_SYSTEMD_SERVICE += xen-init-dom0.service
+XEN_SYSTEMD_SERVICE += xendriverdomain.service
ALL_XEN_SYSTEMD = $(XEN_SYSTEMD_MODULES) \
$(XEN_SYSTEMD_MOUNT) \
diff --git a/tools/hotplug/Linux/systemd/xendriverdomain.service.in b/tools/hotplug/Linux/systemd/xendriverdomain.service.in
new file mode 100644
index 0000000..c0cd454
--- /dev/null
+++ b/tools/hotplug/Linux/systemd/xendriverdomain.service.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=Xen driver domain device daemon
+DefaultDependencies=no
+Requires=proc-xen.mount
+After=proc-xen.mount
+ConditionVirtualization=xen
+
+[Service]
+Type=forking
+ExecStart=@sbindir@/xl devd --pidfile=/var/run/xldevd.pid
+PIDFile=/var/run/xldevd.pid
+
+[Install]
+WantedBy=multi-user.target
--
2.5.5
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/hotplug: Add native systemd xendriverdomain.service
2016-07-03 3:33 [PATCH] tools/hotplug: Add native systemd xendriverdomain.service Rusty Bird
@ 2016-07-07 12:04 ` Wei Liu
2016-07-07 14:19 ` Rusty Bird
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-07-07 12:04 UTC (permalink / raw)
To: Rusty Bird; +Cc: Ian Jackson, Wei Liu, xen-devel
On Sun, Jul 03, 2016 at 03:33:01AM +0000, Rusty Bird wrote:
> Uses ConditionVirtualization=xen, which evaluates to false in dom0 since
> systemd 214 (released 2014-06-11). An alternative would be this line:
> ExecStartPre=/bin/sh -c "! grep -q control_d /proc/xen/capabilities"
>
> (Please rerun autogen.sh)
>
While I understand it might be necessary to have a dedicated service
file for xendriverdomain, I can't seem to be able to figure out the
rationale from the commit message.
After thinking a bit harder, may I suggest commit message like this (and
please correct me if I'm wrong):
We need to have a dedicated service for xendriverdoamin in driver
domain. This patch creates a service file for it. This service is only
relevant to DomU.
The service file uses ConditionVirtualization=xen becuase that evaluates
to false in Dom0 while true in DomU, so that we only starts this service
in DomU.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/hotplug: Add native systemd xendriverdomain.service
2016-07-07 12:04 ` Wei Liu
@ 2016-07-07 14:19 ` Rusty Bird
0 siblings, 0 replies; 3+ messages in thread
From: Rusty Bird @ 2016-07-07 14:19 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu
[-- Attachment #1.1.1: Type: text/plain, Size: 775 bytes --]
Wei Liu:
> While I understand it might be necessary to have a dedicated service
> file for xendriverdomain, I can't seem to be able to figure out the
> rationale from the commit message.
>
> After thinking a bit harder, may I suggest commit message like this (and
> please correct me if I'm wrong):
>
> We need to have a dedicated service for xendriverdoamin in driver
> domain. This patch creates a service file for it. This service is only
> relevant to DomU.
>
> The service file uses ConditionVirtualization=xen becuase that evaluates
> to false in Dom0 while true in DomU, so that we only starts this service
> in DomU.
Thanks for the feedback! I've sent a v2 patch with a less cryptic commit
message that incorporates this information.
Rusty
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 931 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-07 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03 3:33 [PATCH] tools/hotplug: Add native systemd xendriverdomain.service Rusty Bird
2016-07-07 12:04 ` Wei Liu
2016-07-07 14:19 ` Rusty Bird
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).