diff options
author | afunix <p.malishev@gmail.com> | 2016-10-08 14:15:55 -0500 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-10-08 21:15:55 +0200 |
commit | ee5b968eeb92ff241b7f785ade79130b0431d9d8 (patch) | |
tree | 5e446776fba770b21912482abe60db338e3f5463 /system | |
parent | 100a517af2106d609b17311b54c6a48ffb5fd1af (diff) | |
download | ansible-modules-extras-ee5b968eeb92ff241b7f785ade79130b0431d9d8.tar.gz |
gluster_volume adds replica and stripe arguments when adding bricks [#2754] (#2812)
Diffstat (limited to 'system')
-rw-r--r-- | system/gluster_volume.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/system/gluster_volume.py b/system/gluster_volume.py index 85271d94..96174433 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -317,8 +317,14 @@ def stop_volume(name): def set_volume_option(name, option, parameter): run_gluster([ 'volume', 'set', name, option, parameter ]) -def add_bricks(name, new_bricks, force): +def add_bricks(name, new_bricks, stripe, replica, force): args = [ 'volume', 'add-brick', name ] + if stripe: + args.append('stripe') + args.append(str(stripe)) + if replica: + args.append('replica') + args.append(str(replica)) args.extend(new_bricks) if force: args.append('force') @@ -445,7 +451,7 @@ def main(): removed_bricks.append(brick) if new_bricks: - add_bricks(volume_name, new_bricks, force) + add_bricks(volume_name, new_bricks, stripes, replicas, force) changed = True # handle quotas |