Change in vdsm[master]: service: make initctl compatible with systemctl reload rc

ykaplan at redhat.com ykaplan at redhat.com
Wed Dec 31 09:34:28 UTC 2014


Yeela Kaplan has uploaded a new change for review.

Change subject: service: make initctl compatible with systemctl reload rc
......................................................................

service: make initctl compatible with systemctl reload rc

When reloading service with systemctl and the service is inactive
rc is 1.
Same scenario on initctl return rc 0.

We want service reload rc to be consistent on vdsm
and reload is failing when service is down
so we will adapt sysV to systemd.

Change-Id: I878fb898204f7a8a564941b43b12c024ef208765
Signed-off-by: Yeela Kaplan <ykaplan at redhat.com>
---
M lib/vdsm/tool/service.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/36491/1

diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index c7bc864..3c205cc 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -225,6 +225,9 @@
     def _initctlReload(srvName):
         cmd = [_INITCTL.cmd, "reload", srvName]
         rc, out, err = execCmd(cmd)
+        status = service_status(srvName, False)
+        if (rc==0) and (status!=0):
+            rc = 1
         return (rc, out, err)
 
     @_initctlNative


-- 
To view, visit http://gerrit.ovirt.org/36491
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I878fb898204f7a8a564941b43b12c024ef208765
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list