tools/hotplug: Add native systemd xendriverdomain.service
PATCH 1/1 tools/hotplug: Add native systemd xendriverdomain.service
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)
--- 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
tools/configure.ac +1 -0
@@ -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 ])
tools/hotplug/Linux/systemd/Makefile +1 -0
@@ -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) \
tools/hotplug/Linux/systemd/xendriverdomain.service.in new file +14 -0
@@ -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
Signature · 7 lines
2.5.5 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 6 lines · 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 -qcontrol_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
[email protected]
https://lists.xen.org/xen-devel
Wei Liu:
Quoted 7 lines
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):
Quoted 7 lines
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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel