Change in vdsm[master]: vdsm-tool: avoid service action redirections

danken at redhat.com danken at redhat.com
Thu Jun 13 10:44:54 UTC 2013


Dan Kenigsberg has submitted this change and it was merged.

Change subject: vdsm-tool: avoid service action redirections
......................................................................


vdsm-tool: avoid service action redirections

Some smart init system will redirect actions to other init system when
the service is not managed natively. This behaviour interferes the
parsing of the service action output.

Add a decorator _XXXNative to check if a service is managed by a certain
init system. _XXXNative tag is then added to every action function to
avoid execution of an action on a service that is not managed by that
particular init system, so as to avoid redirections.

An environment variable is also added for SysV actions to prevent
redirection to SystemD, this is specific for those systems with
co-existence of SystemD and SysV, and is no harm to those systems with
only SysV or with co-existence of Upstart and SysV.

Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/15099
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/tool/service.py
1 file changed, 75 insertions(+), 12 deletions(-)

Approvals:
  Dan Kenigsberg: Looks good to me, approved
  Zhou Zheng Sheng: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list