Change in vdsm[master]: vdsm-tool: service management work with previous systemd rel...
zhshzhou at linux.vnet.ibm.com
zhshzhou at linux.vnet.ibm.com
Wed Jul 3 09:27:43 UTC 2013
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: vdsm-tool: service management work with previous systemd release
......................................................................
vdsm-tool: service management work with previous systemd release
The service management assumes systemctl automatically adds ".service"
suffix to the service name. This is true for the latest SystemD, but
before systemd-44-20.fc17 [1], this feature is not available.
This patch adds ".service" suffix before sending the service name to
systemctl, so it does not depend on the auto-suffixing feature any more.
[1] https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090358.html
Change-Id: Ice83296bd88ed5bb13630694560cde58b050edbb
Reported-by: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
---
M lib/vdsm/tool/service.py
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/16379/1
diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index a294dca..06d9e83 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -110,11 +110,12 @@
if rc != 0:
raise ServiceOperationError(
"Error listing unit files", '\n'.join(out), '\n'.join(err))
+ fullName = srvName + ".service"
for line in out:
- if srvName + ".service" == line.split(" ", 1)[0]:
- return systemctlFun(srvName)
+ if fullName == line.split(" ", 1)[0]:
+ return systemctlFun(fullName)
raise ServiceNotExistError("%s is not native systemctl service" %
- srvName)
+ fullName)
return wrapper
@_systemctlNative
--
To view, visit http://gerrit.ovirt.org/16379
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice83296bd88ed5bb13630694560cde58b050edbb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
More information about the vdsm-patches
mailing list