Ramesh N has posted comments on this change. Change subject: gluster:enforce gluster fencing policies ......................................................................
Patch Set 2: (6 comments) https://gerrit.ovirt.org/#/c/59600/2/vdsm/API.py File vdsm/API.py: Line 54: from vdsm.define import doneCode, errCode Line 55: import caps Line 56: from vdsm.config import config Line 57: from vdsm.virt import sampling Line 58: from gluster import cli as glustercli > is glustercli available only when vdsm-gluster is present? I think it won't work without vdsm-gluster. This import will result in error for deployment with vdsm-gluster. I think I have to use supervdsm.getProxy() to call the vdsm verbs. I will change this. Line 59: Line 60: Line 61: haClient = None # Define here to work around pyflakes issue #13 Line 62: try: Line 1256: self.log.debug("Host has live lease on '%s'", sd) Line 1257: return False Line 1258: Line 1259: self.log.debug("Host doesn't have any live lease") Line 1260: return can_fence_gluster_hosts(policy) > executed only if the host has gluster service enabled as well? Check for the policies are done in the below method. It is controlled in the engine side. If engine sends gluster specific polices with value 'true' then it is assumed that engine knows that host is running gluster service and these polices can be enforced Line 1261: Line 1262: def can_fence_gluster_hosts(policy): Line 1263: skipFecingIfGlusterBricksUp = \ Line 1264: policy.get('skipFencingIfGlusterBricksUp') == 'true' Line 1259: self.log.debug("Host doesn't have any live lease") Line 1260: return can_fence_gluster_hosts(policy) Line 1261: Line 1262: def can_fence_gluster_hosts(policy): Line 1263: skipFecingIfGlusterBricksUp = \ > typo -> skipFencingIfGlusterBricksUp Done Line 1264: policy.get('skipFencingIfGlusterBricksUp') == 'true' Line 1265: skipFecingIfGlusterQuorumNotMet = \ Line 1266: policy.get('skipFencingIfGlusterQuorumNotMet') == 'true' Line 1267: hostUuid = policy.get('glusterServerUuid') Line 1289: return True Line 1290: Line 1291: def is_gluster_quorum_met(volumeInfo, volumeStatus, hostUuid): Line 1292: replicaCount = volumeInfo.get('replicaCount') Line 1293: subVolumes = volumeInfo.get('brickCount') > subVolumes = volumeInfo.get('brickCount') / replicaCount ? its a miss. I will fix Line 1294: quorumType = volumeInfo.get('options').get('cluster.quorum-type') Line 1295: if quorumType == "fixed": Line 1296: quorumCount = volumeInfo.get('cluster.quorum-count') Line 1297: elif quorumType == "auto": Line 1317: if bricksGoingDown > 0 and bricksRemainingUp < quorumCount: Line 1318: return False Line 1319: return True Line 1320: Line 1321: def get_brick_status(hostUuid, brickName, volumeStatus): > get_brick ? Done Line 1322: return [brick for brick in volumeStatus.get('bircks') Line 1323: if brick.get('hostuuid') == hostUuid Line 1324: and brick.get('brick') == brickName][0] Line 1325: Line 1318: return False Line 1319: return True Line 1320: Line 1321: def get_brick_status(hostUuid, brickName, volumeStatus): Line 1322: return [brick for brick in volumeStatus.get('bircks') > bricks Done Line 1323: if brick.get('hostuuid') == hostUuid Line 1324: and brick.get('brick') == brickName][0] Line 1325: Line 1326: self.log.debug('fenceNode(addr=%s,port=%s,agent=%s,user=%s,passwd=%s,' -- To view, visit https://gerrit.ovirt.org/59600 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c18571209a3a7682a43bd2814b9ee3f0a69c55f Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ramesh N <[email protected]> Gerrit-Reviewer: Darshan N <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ramesh N <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
