Change in vdsm[master]: Move fencing logic out of API.py

shuming at linux.vnet.ibm.com shuming at linux.vnet.ibm.com
Thu Aug 23 03:00:09 UTC 2012


Shu Ming has posted comments on this change.

Change subject: Move fencing logic out of API.py
......................................................................


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

(2 inline comments)

....................................................
File vdsm/fenceAgent.py
Line 99:         power = 'on'
Line 100:     elif p.returncode == 2:
Line 101:         power = 'off'
Line 102:     else:
Line 103:         power = 'unknown'
Does power = 'unknown'  have special meaning to VDSM?  I think it is also a FenceStatusCheckError.  So we can merge line 102, 103 into line 95,96.
Line 104: 
Line 105:     return power
Line 106: 
Line 107: 


Line 108: def fenceNode(addr, port, agent, username, password, action,
Line 109:         secure=False, options='', cancelEvent=None):
Line 110: 
Line 111:     if action not in ('on', 'off', 'reboot'):
Line 112:         raise ValueError('illegal action ' + action)
It seems there is  no up layer module care about ValueError exception.  It is better to log this error here.
Line 113: 
Line 114:     inp = _buildInput(addr, port, agent, username, password, action, secure,
Line 115:         options)
Line 116: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I944c6548a42612f705a410fb4290215451bca035
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list