Dan Kenigsberg has posted comments on this change.
Change subject: Move fencing logic out of API.py
......................................................................
Patch Set 2: (2 inline comments)
arghh, this cleanup is clearly needed; thanks for taking this task. I wish it was built of
clearer small steps - one for refactoring, another to and the shutdownEvent.
Anyway, I (and rliberman) can lend you hosts with fence agents (for "status"
only, please do not reboot!)
....................................................
File vdsm/API.py
Line 983: 'passwd=%s,action=%s,secure=%s,options=%s)', addr, port,
agent,
Line 984: username, 'XXXX', action, secure, options)
Line 985:
Line 986: secure = utils.tobool(secure)
Line 987: port = int(port)
the name "port" is intended to mislead people to think of TCP port number. but
it is not. it is actually an identifier of a blade, and it may even be a string iirc.
Line 988:
Line 989: if action == "status":
Line 990: try:
Line 991: power = fenceAgent.getFenceStatus(addr, port, agent, username,
Line 994: return {'status': doneCode,
Line 995: 'power': power}
Line 996:
Line 997: except fenceAgent.FenceStatusCheckError as e:
Line 998: return {'status': {'code': 1, 'message':
str(e)}}
yep, I believe code=1 is going to confuse Engine.
Line 999:
Line 1000: try:
Line 1001: fenceAgent.fenceNode(addr, port, agent, username, password,
secure,
Line 1002: options, self._cif.shutdownEvent)
--
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: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>