Aravinda VK has uploaded a new change for review.
Change subject: gluster: Replace bricks verbs removed ......................................................................
gluster: Replace bricks verbs removed
glusterfs phased out replace-brick feature. http://lists.nongnu.org/archive/html/gluster-devel/2013-09/msg00155.html
Existing replace-bricks verbs are not yet consumed by ovirt-engine, so removing all the verbs.
Removed verbs: glusterVolumeReplaceBrickStart glusterVolumeReplaceBrickAbort glusterVolumeReplaceBrickPause glusterVolumeReplaceBrickStatus glusterVolumeReplaceBrickCommit glusterVolumeRemoveBrickStart
Change-Id: I23cd224ced9c6892ab182f663476df428f2f35da Signed-off-by: Aravinda VK avishwan@redhat.com --- M vdsm/gluster/api.py M vdsm/gluster/cli.py M vdsm/gluster/exception.py M vdsm/gluster/tasks.py 4 files changed, 1 insertion(+), 163 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/20060/1
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py index ebb0901..43e60cf 100644 --- a/vdsm/gluster/api.py +++ b/vdsm/gluster/api.py @@ -129,43 +129,6 @@ return self.svdsmProxy.glusterVolumeRebalanceStatus(volumeName)
@exportAsVerb - def volumeReplaceBrickStart(self, volumeName, existingBrick, newBrick, - options=None): - return self.svdsmProxy.glusterVolumeReplaceBrickStart(volumeName, - existingBrick, - newBrick) - - @exportAsVerb - def volumeReplaceBrickAbort(self, volumeName, existingBrick, newBrick, - options=None): - self.svdsmProxy.glusterVolumeReplaceBrickAbort(volumeName, - existingBrick, - newBrick) - - @exportAsVerb - def volumeReplaceBrickPause(self, volumeName, existingBrick, newBrick, - options=None): - self.svdsmProxy.glusterVolumeReplaceBrickPause(volumeName, - existingBrick, - newBrick) - - @exportAsVerb - def volumeReplaceBrickStatus(self, volumeName, oldBrick, newBrick, - options=None): - st, msg = self.svdsmProxy.glusterVolumeReplaceBrickStatus(volumeName, - oldBrick, - newBrick) - return {'replaceBrick': st, 'message': msg} - - @exportAsVerb - def volumeReplaceBrickCommit(self, volumeName, existingBrick, newBrick, - force=False, options=None): - self.svdsmProxy.glusterVolumeReplaceBrickCommit(volumeName, - existingBrick, - newBrick, - force) - - @exportAsVerb def volumeRemoveBrickStart(self, volumeName, brickList, replicaCount=0, options=None): return self.svdsmProxy.glusterVolumeRemoveBrickStart(volumeName, diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py index a67658f..3ed3bd4 100644 --- a/vdsm/gluster/cli.py +++ b/vdsm/gluster/cli.py @@ -75,7 +75,6 @@
class TaskType: REBALANCE = 'REBALANCE' - REPLACE_BRICK = 'REPLACE_BRICK' REMOVE_BRICK = 'REMOVE_BRICK'
@@ -651,83 +650,6 @@
@makePublic -def volumeReplaceBrickStart(volumeName, existingBrick, newBrick): - command = _getGlusterVolCmd() + ["replace-brick", volumeName, - existingBrick, newBrick, "start"] - try: - xmltree = _execGlusterXml(command) - except ge.GlusterCmdFailedException, e: - raise ge.GlusterVolumeReplaceBrickStartFailedException(rc=e.rc, - err=e.err) - try: - return {'taskId': xmltree.find('volReplaceBrick/task-id').text} - except _etreeExceptions: - raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)]) - - -@makePublic -def volumeReplaceBrickAbort(volumeName, existingBrick, newBrick): - command = _getGlusterVolCmd() + ["replace-brick", volumeName, - existingBrick, newBrick, "abort"] - try: - _execGlusterXml(command) - return True - except ge.GlusterCmdFailedException, e: - raise ge.GlusterVolumeReplaceBrickAbortFailedException(rc=e.rc, - err=e.err) - - -@makePublic -def volumeReplaceBrickPause(volumeName, existingBrick, newBrick): - command = _getGlusterVolCmd() + ["replace-brick", volumeName, - existingBrick, newBrick, "pause"] - try: - _execGlusterXml(command) - return True - except ge.GlusterCmdFailedException, e: - raise ge.GlusterVolumeReplaceBrickPauseFailedException(rc=e.rc, - err=e.err) - - -@makePublic -def volumeReplaceBrickStatus(volumeName, existingBrick, newBrick): - rc, out, err = _execGluster(_getGlusterVolCmd() + ["replace-brick", - volumeName, - existingBrick, newBrick, - "status"]) - if rc: - raise ge.GlusterVolumeReplaceBrickStatusFailedException(rc, out, - err) - message = "\n".join(out) - statLine = out[0].strip().upper() - if BrickStatus.PAUSED in statLine: - return BrickStatus.PAUSED, message - elif statLine.endswith('MIGRATION COMPLETE'): - return BrickStatus.COMPLETED, message - elif statLine.startswith('NUMBER OF FILES MIGRATED'): - return BrickStatus.RUNNING, message - elif statLine.endswith("UNKNOWN"): - return BrickStatus.UNKNOWN, message - else: - return BrickStatus.NA, message - - -@makePublic -def volumeReplaceBrickCommit(volumeName, existingBrick, newBrick, - force=False): - command = _getGlusterVolCmd() + ["replace-brick", volumeName, - existingBrick, newBrick, "commit"] - if force: - command.append('force') - try: - _execGlusterXml(command) - return True - except ge.GlusterCmdFailedException, e: - raise ge.GlusterVolumeReplaceBrickCommitFailedException(rc=e.rc, - err=e.err) - - -@makePublic def volumeRemoveBrickStart(volumeName, brickList, replicaCount=0): command = _getGlusterVolCmd() + ["remove-brick", volumeName] if replicaCount: @@ -969,10 +891,7 @@ taskType = taskType.upper().replace('-', '_').replace(' ', '_') taskId = c.find('id').text bricks = [] - if taskType == TaskType.REPLACE_BRICK: - bricks.append(c.find('params/srcBrick').text) - bricks.append(c.find('params/dstBrick').text) - elif taskType == TaskType.REMOVE_BRICK: + if taskType == TaskType.REMOVE_BRICK: for b in c.findall('params/brick'): bricks.append(b.text) elif taskType == TaskType.REBALANCE: diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py index 20c157e..4e9d08a 100644 --- a/vdsm/gluster/exception.py +++ b/vdsm/gluster/exception.py @@ -251,46 +251,6 @@ message = "Volume delete failed"
-class GlusterVolumeReplaceBrickAlreadyStartedException(GlusterVolumeException): - code = 4141 - message = "Volume replace brick failed" - - -class GlusterVolumeReplaceBrickStartFailedException(GlusterVolumeException): - code = 4142 - message = "Volume replace brick start failed" - - -class GlusterVolumeReplaceBrickNotStartedException(GlusterVolumeException): - code = 4143 - message = "Volume replace brick not started" - - -class GlusterVolumeReplaceBrickAbortFailedException(GlusterVolumeException): - code = 4144 - message = "Volume replace brick abort failed" - - -class GlusterVolumeReplaceBrickPauseFailedException(GlusterVolumeException): - code = 4145 - message = "Volume replace brick pause failed" - - -class GlusterVolumeReplaceBrickStatusFailedException(GlusterVolumeException): - code = 4146 - message = "Volume replace brick status failed" - - -class GlusterVolumeReplaceBrickInProgressException(GlusterVolumeException): - code = 4147 - message = "Volume replace brick in progress" - - -class GlusterVolumeReplaceBrickCommitFailedException(GlusterVolumeException): - code = 4148 - message = "Volume replace brick commit failed" - - class GlusterVolumesListFailedException(GlusterVolumeException): code = 4149 message = "Volume list failed" diff --git a/vdsm/gluster/tasks.py b/vdsm/gluster/tasks.py index 8defd9b..f76d4a8 100644 --- a/vdsm/gluster/tasks.py +++ b/vdsm/gluster/tasks.py @@ -38,10 +38,6 @@ elif taskType == TaskType.REMOVE_BRICK: data = cli.volumeRemoveBrickStatus(volumeName, value['bricks']) - elif taskType == TaskType.REPLACE_BRICK: - data = cli.volumeReplaceBrickStatus(volumeName, - value['bricks'][0], - value['bricks'][1])
summary = data['summary'] if 'summary' in data else {} return {"volume": volumeName,
oVirt Jenkins CI Server has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/4888/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4003/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4813/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 2: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/4930/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4044/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4854/ : SUCCESS
Aravinda VK has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 2: Verified+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 2: -Verified
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/4933/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4047/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/4857/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 2: Code-Review+1
/me is waiting for an ack by Bala.
Aravinda VK has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 3: Verified+1
Rebased and included client/vdsClientGluster.py
oVirt Jenkins CI Server has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 3: Code-Review-1 Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/6555/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/5662/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6468/ : UNSTABLE
Aravinda VK has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 4: Verified+1
Rebased and included client/vdsClientGluster.py
oVirt Jenkins CI Server has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/6562/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/5669/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6475/ : SUCCESS
Itamar Heim has posted comments on this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Patch Set 4:
ping
Itamar Heim has abandoned this change.
Change subject: gluster: Replace bricks verbs removed ......................................................................
Abandoned
abandoning per no reply. please restore if still relevant.
vdsm-patches@lists.fedorahosted.org