Zhou Zheng Sheng has posted comments on this change. Change subject: vdsm-tool: add service management utilities ......................................................................
Patch Set 3: (2 inline comments) .................................................... File lib/vdsm/tool/service.py Line 29: from vdsm.tool import expose Line 30: from vdsm.utils import CommandPath Line 31: Line 32: Line 33: def execCmd(argv): Thanks Yaniv, Dan, due to the PYTHONPATH reason, modules of vdsm-tool can not run exeCmd from vdsm.utils. I submit a patch to import exeCmd correctly for these modules and unify existing ad-hoc execCmd implementations ( http://gerrit.ovirt.org/#/c/13917/ ). Then I rebase my general service mgmt patch on the unifying execCmd patch. Line 34: p = subprocess.Popen(argv, stdout=subprocess.PIPE, Line 35: stderr=subprocess.PIPE) Line 36: out, err = p.communicate() Line 37: rc = p.returncode Line 131: alreayRunRegex = r"\Wis already running\W" Line 132: rc, out, err = execCmd(cmd) Line 133: if rc != 0: Line 134: # initctl returns an error if the job is already started Line 135: # here we igore it and returns 0 if the job is already running Done Line 136: rc = int(re.search(alreayRunRegex, out, re.MULTILINE) is not None) Line 137: return (rc, out, err) Line 138: Line 139: def _initctlStop(srvName): -- To view, visit http://gerrit.ovirt.org/13701 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd1cbcf5fd00bb1ec73c5970be012e294b3b4c55 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Vered Volansky <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
