gluster_volume: use force option during add-brick
This commit is contained in:
parent
561df9ce94
commit
e0b6586c41
1 changed files with 6 additions and 3 deletions
|
@ -262,8 +262,11 @@ def main():
|
||||||
def set_volume_option(name, option, parameter):
|
def set_volume_option(name, option, parameter):
|
||||||
run_gluster([ 'volume', 'set', name, option, parameter ])
|
run_gluster([ 'volume', 'set', name, option, parameter ])
|
||||||
|
|
||||||
def add_brick(name, brick):
|
def add_brick(name, brick, force):
|
||||||
run_gluster([ 'volume', 'add-brick', name, brick ])
|
args = [ 'volume', 'add-brick', name, brick ]
|
||||||
|
if force:
|
||||||
|
args.append('force')
|
||||||
|
run_gluster(args)
|
||||||
|
|
||||||
def rebalance(name):
|
def rebalance(name):
|
||||||
run_gluster(['volume', 'rebalance', name, 'start'])
|
run_gluster(['volume', 'rebalance', name, 'start'])
|
||||||
|
@ -363,7 +366,7 @@ def main():
|
||||||
removed_bricks.append(brick)
|
removed_bricks.append(brick)
|
||||||
|
|
||||||
for brick in new_bricks:
|
for brick in new_bricks:
|
||||||
add_brick(volume_name, brick)
|
add_brick(volume_name, brick, force)
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
# handle quotas
|
# handle quotas
|
||||||
|
|
Loading…
Reference in a new issue