|
|
@ -289,8 +289,9 @@ def stop_volume(name):
|
|
|
|
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, force):
|
|
|
|
def add_bricks(name, new_bricks, force):
|
|
|
|
args = [ 'volume', 'add-brick', name, brick ]
|
|
|
|
args = [ 'volume', 'add-brick', name ]
|
|
|
|
|
|
|
|
args.extend(new_bricks)
|
|
|
|
if force:
|
|
|
|
if force:
|
|
|
|
args.append('force')
|
|
|
|
args.append('force')
|
|
|
|
run_gluster(args)
|
|
|
|
run_gluster(args)
|
|
|
@ -411,8 +412,8 @@ def main():
|
|
|
|
if brick not in all_bricks:
|
|
|
|
if brick not in all_bricks:
|
|
|
|
removed_bricks.append(brick)
|
|
|
|
removed_bricks.append(brick)
|
|
|
|
|
|
|
|
|
|
|
|
for brick in new_bricks:
|
|
|
|
if new_bricks:
|
|
|
|
add_brick(volume_name, brick, force)
|
|
|
|
add_bricks(volume_name, new_bricks, force)
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
|
|
|
|
|
|
|
|
# handle quotas
|
|
|
|
# handle quotas
|
|
|
|