Yedidyah Bar David has posted comments on this change. Change subject: packaging: setup: check service status by rc ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/25455/1/packaging/common_utils.py File packaging/common_utils.py: Line 258: Line 259: def status(self): Line 260: logging.debug("getting status for %s", self.name) Line 261: (output, rc) = self._serviceFacility("status") Line 262: self.lastStateUp = (rc == 0) > Are you sure this will work for all services involved? I tested this on rhel. It works well, although 'service' is a wrapper that either calls the relevant /etc/init.d/ script or initctl. Should work also on fedora, and I tested some services there and it seems to work well, but this is through a wrapper 'service' command that calls systemd stuff. otopi has much more code for this, specific to system ("rhel" (either upstart or sysvinit), systemd (e.g. fedora), openrc (gentoo). do you want to copy parts from there? Not sure there is much point for 3.3. Line 263: return (output, rc) Line 264: Line 265: def _serviceFacility(self, action): Line 266: """ -- To view, visit http://gerrit.ovirt.org/25455 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I306dfb6cf069c26a59e1d9a0d4678a1888300784 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yaniv Dary <yd...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches