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

2013-06-13 Thread danken
Dan Kenigsberg has posted comments on this change.

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


Patch Set 5: Looks good to me, approved

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-13 Thread danken
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 zhshz...@linux.vnet.ibm.com
Reviewed-on: http://gerrit.ovirt.org/15099
Reviewed-by: Dan Kenigsberg dan...@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 zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-12 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 5:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2765/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1953/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2839/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-12 Thread zhshzhou
Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 5: Verified

Rebase to master

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-10 Thread avishwan
Aravinda VK has posted comments on this change.

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


Patch Set 4: Looks good to me, but someone else must approve

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-10 Thread danken
Dan Kenigsberg has posted comments on this change.

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


Patch Set 4: Looks good to me, approved

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread avishwan
Aravinda VK has posted comments on this change.

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


Patch Set 3: Looks good to me, but someone else must approve

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread avishwan
Aravinda VK has posted comments on this change.

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


Patch Set 3: No score

This patch needs rebase, since dependent patch is merged.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread avishwan
Aravinda VK has posted comments on this change.

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


Patch Set 3: Looks good to me, but someone else must approve

Tested in Fedora 18.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 4: Fails

Build Failed 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2580/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1759/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2654/ : FAILURE

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 4:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2580/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2654/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1765/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 4: No score

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2580/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1765/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2661/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-05 Thread zhshzhou
Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 4: Verified

Rebased by Aravinda. No changes, copy verify flag.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-04 Thread ybronhei
Yaniv Bronhaim has posted comments on this change.

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


Patch Set 3: Looks good to me, but someone else must approve

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-03 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 3: Fails

Build Failed 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2524/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1697/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2595/ : FAILURE

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-03 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 3: No score

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2524/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1701/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2599/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-03 Thread zhshzhou
Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 3: Verified

New patch set: Raises exception when the service is not managed by a the 
current init system, then continues to try another init system. In other cases, 
gives up trying and report error.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-06-02 Thread danken
Dan Kenigsberg has posted comments on this change.

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


Patch Set 2: I would prefer that you didn't submit this

(2 inline comments)


File lib/vdsm/tool/service.py
Line 80: rc, out, err = execCmd(cmd, raw=False)
Line 81: if rc != 0:
Line 82: return (rc, out, err)
Line 83: for line in out:
Line 84: if srvName + .service == line.split( , 1)[0]:
ouch. these bug fixes deserve their own commit message. The author and 
reviewers of http://gerrit.ovirt.org/13701 should have been much more prudent!
Line 85: return systemctlFun(srvName)
Line 86: return (1, , %s is not native systemctl service % 
srvName)
Line 87: return wrapper
Line 88: 


Line 132: def wrapper(srvName):
Line 133: cmd = [_INITCTL.cmd, usage, srvName]
Line 134: rc, out, err = execCmd(cmd, raw=False)
Line 135: if rc != 0:
Line 136: return (1, , %s is not an Upstart service % 
srvName)
I think that it would be much better to have this wrapper raise a specific 
exception, to be caught and handled in runAlts: The case where a service action 
fails with rc==1 is very different from the case where the service does not 
exist. Searching for other alternatives should continue only on the latter case 
imho.

Even if we decide not to use exceptions here, a CONSTANT errorcode would be 
better than hard-coded 1.
Line 137: 
Line 138: return initctlFun(srvName)
Line 139: return wrapper
Line 140: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-30 Thread zhshzhou
Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 2: Verified

Rebase to the latest master, because this patch needs the changes from commit 
'422d40b'. 422d40b makes probing a service status does not lead to un-caught 
exception.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-29 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 2:

Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1647/ (2/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-29 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 2:

Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2548/ (1/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-29 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 2:

Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2478/ (3/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-29 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 2:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2478/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1647/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2548/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-28 Thread avishwan
Aravinda VK has posted comments on this change.

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


Patch Set 1: Looks good to me, but someone else must approve

Tested in Fedora 18.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Aravinda VK avish...@redhat.com
Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread zhshzhou
Zhou Zheng Sheng has uploaded a new change for review.

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 zhshz...@linux.vnet.ibm.com
---
M lib/vdsm/tool/service.py
1 file changed, 43 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/15099/1

diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index 8f69f41..b483ed5 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -31,8 +31,8 @@
 from vdsm.utils import execCmd as _execCmd
 
 
-def execCmd(argv, raw=True):
-return _execCmd(argv, raw=raw)
+def execCmd(argv, raw=True, *args, **kwargs):
+return _execCmd(argv, raw=raw, *args, **kwargs)
 
 
 _SYSTEMCTL = CommandPath(systemctl,
@@ -76,9 +76,9 @@
 if rc != 0:
 return (rc, out, err)
 for line in out:
-if srvName + .service == line.split( , 1):
+if srvName + .service == line.split( , 1)[0]:
 return systemctlFun(srvName)
-return (1, , %s is not native systemctl service)
+return (1, , %s is not native systemctl service % srvName)
 return wrapper
 
 @_systemctlNative
@@ -122,6 +122,18 @@
 except OSError:
 pass
 else:
+def _initctlNative(initctlFun):
+@functools.wraps(initctlFun)
+def wrapper(srvName):
+cmd = [_INITCTL.cmd, usage, srvName]
+rc, out, err = execCmd(cmd, raw=False)
+if rc != 0:
+return (1, , %s is not an Upstart service % srvName)
+
+return initctlFun(srvName)
+return wrapper
+
+@_initctlNative
 def _initctlStart(srvName):
 cmd = [_INITCTL.cmd, start, srvName]
 alreadyRunRegex = r\bis already running\b
@@ -132,6 +144,7 @@
 rc = int(not re.search(alreadyRunRegex, err, re.MULTILINE))
 return (rc, out, err)
 
+@_initctlNative
 def _initctlStop(srvName):
 cmd = [_INITCTL.cmd, stop, srvName]
 alreadyStoppedRegex = r'\bUnknown instance\b'
@@ -142,6 +155,7 @@
 rc = int(not re.search(alreadyStoppedRegex, err, re.MULTILINE))
 return (rc, out, err)
 
+@_initctlNative
 def _initctlStatus(srvName):
 cmd = [_INITCTL.cmd, status, srvName]
 rc, out, err = execCmd(cmd)
@@ -150,12 +164,14 @@
 rc = _isStopped(out)
 return (rc, out, err)
 
+@_initctlNative
 def _initctlRestart(srvName):
 # initctl restart someSrv will not restart the service if it is
 # already running, so we force it to do so
 _initctlStop(srvName)
 return _initctlStart(srvName)
 
+@_initctlNative
 def _initctlDisable(srvName):
 if not os.path.isfile(/etc/init/%s.conf % srvName):
 return 1, , 
@@ -170,30 +186,47 @@
 _srvDisableAlts.append(_initctlDisable)
 
 
+def _sysvNative(sysvFun):
+@functools.wraps(sysvFun)
+def wrapper(srvName):
+srvPath = os.path.join(os.sep + 'etc', 'init.d', srvName)
+if os.path.exists(srvPath):
+return sysvFun(srvName)
+
+return (1, , %s is not a SysV service % srvName)
+return wrapper
+
 try:
 _SERVICE.cmd
 except OSError:
 pass
 else:
+_sysvEnv = {'SYSTEMCTL_SKIP_REDIRECT': '1'}
+_execSysvEnv = functools.partial(execCmd, env=_sysvEnv)
+
+@_sysvNative
 def _serviceStart(srvName):
 cmd = [_SERVICE.cmd, srvName, start]
-return execCmd(cmd)
+return _execSysvEnv(cmd)
 
+@_sysvNative
 def _serviceStop(srvName):
 cmd = [_SERVICE.cmd, srvName, stop]
-return execCmd(cmd)
+return _execSysvEnv(cmd)
 
+@_sysvNative
 def _serviceStatus(srvName):
 cmd = [_SERVICE.cmd, srvName, status]
-rc, out, err = execCmd(cmd)
+rc, out, err = _execSysvEnv(cmd)
 if rc == 0:
 # certain service rc is 0 even though the service is stopped
 rc = _isStopped(out)
 return (rc, out, err)
 
+@_sysvNative
 def _serviceRestart(srvName):
 cmd = 

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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1:

Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2496/ (1/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1:

Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1594/ (2/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1:

Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2427/ (3/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1: Fails

Build Failed 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2427/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1594/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2496/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1: No score

Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1597/ (3/3)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread Gerrit Code Review
oVirt Jenkins CI Server has posted comments on this change.

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


Patch Set 1:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2427/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2496/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1597/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


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

2013-05-27 Thread zhshzhou
Zhou Zheng Sheng has posted comments on this change.

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


Patch Set 1: Verified

Test on RHEL6, Fedora and Ubuntu.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idff541a724e3e2d2167b1f235af5ed04a3dc2ee0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches