Timothy Asir has uploaded a new change for review. Change subject: gluster: Add force option to add brick command ......................................................................
gluster: Add force option to add brick command Allows option to glusterfs to create brick directries under root partition. Change-Id: I907e3798d2a360cfcfd736d7cf9cb8f43c95ca10 Signed-off-by: Timothy Asir <[email protected]> --- M client/vdsClientGluster.py M vdsm/gluster/api.py M vdsm/gluster/cli.py 3 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/21525/1 diff --git a/client/vdsClientGluster.py b/client/vdsClientGluster.py index d1a3f5f..dc8bd52 100644 --- a/client/vdsClientGluster.py +++ b/client/vdsClientGluster.py @@ -78,9 +78,11 @@ volumeName = params.get('volumeName', '') replicaCount = params.get('replica', '') stripeCount = params.get('stripe', '') + force = (params.get('force', 'no').upper() == 'YES') status = self.s.glusterVolumeBrickAdd(volumeName, brickList, - replicaCount, stripeCount) + replicaCount, stripeCount, force) + pp.pprint(status) return status['status']['code'], status['status']['message'] def do_glusterVolumeSet(self, args): @@ -484,7 +486,7 @@ 'glusterVolumeBrickAdd': ( serv.do_glusterVolumeBrickAdd, ('volumeName=<volume_name> bricks=<brick[,brick, ...]> ' - '[replica=<count>] [stripe=<count>]\n\t' + '[replica=<count>] [stripe=<count>] [force={yes|no}]\n\t' '<volume_name> is existing volume name\n\t' '<brick[,brick, ...]> is new brick(s) which will be added to ' 'the volume', diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py index c9fe932..5c4db94 100644 --- a/vdsm/gluster/api.py +++ b/vdsm/gluster/api.py @@ -112,7 +112,7 @@ def volumeBrickAdd(self, volumeName, brickList, replicaCount=0, stripeCount=0, options=None): self.svdsmProxy.glusterVolumeAddBrick(volumeName, brickList, - replicaCount, stripeCount) + replicaCount, stripeCount, options) @exportAsVerb def volumeRebalanceStart(self, volumeName, rebalanceType="", diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py index a654b56..a64b80a 100644 --- a/vdsm/gluster/cli.py +++ b/vdsm/gluster/cli.py @@ -544,13 +544,15 @@ @makePublic def volumeAddBrick(volumeName, brickList, - replicaCount=0, stripeCount=0): + replicaCount=0, stripeCount=0, option=None): command = _getGlusterVolCmd() + ["add-brick", volumeName] if stripeCount: command += ["stripe", "%s" % stripeCount] if replicaCount: command += ["replica", "%s" % replicaCount] command += brickList + if option: + command.append('force') try: _execGlusterXml(command) return True -- To view, visit http://gerrit.ovirt.org/21525 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I907e3798d2a360cfcfd736d7cf9cb8f43c95ca10 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Timothy Asir <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
