Expand volume fix

This patch allows new units with storage to be added into
an existing volume.

Change-Id: I6e0a0295a73b06c4cc59e20545d55c981ac1e5b4
Depends-On: I8b2ad6835f5c02852391858baa77c7fa38426da5
This commit is contained in:
Chris Holcombe 2017-07-10 15:28:04 -07:00
parent 0db1daa12f
commit aa9a6293b4
3 changed files with 3 additions and 6 deletions

View File

@ -315,8 +315,7 @@ def get_brick_list(peers: Dict[str, Dict], volume: Optional[Volume]) -> Result:
else:
# Existing volume. Build a differential list.
log("Existing volume. Building differential brick list {} {}".format(
peers, volume))
log("Existing volume. Building differential brick list ")
new_peers = find_new_peers(peers, volume)
if len(new_peers) < replicas:

View File

@ -1260,7 +1260,7 @@ def volume_add_brick(volume: str, brick_list: List[Brick],
if not brick_list:
raise ValueError("The brick list is empty. Not expanding volume")
try:
bricks.add(volume, brick_list, force=force)
bricks.add(volume, [str(b) for b in brick_list], force=force)
except GlusterCmdException:
raise

View File

@ -138,8 +138,6 @@ def initialize_volume(peer) -> None:
else:
log("Volume creation failed with error: {}".format(
create_result.value))
else:
set_state("volume.needs.expansion")
except GlusterCmdException as e:
log("Volume info command failed: {}".format(e))
return
@ -300,7 +298,7 @@ def create_volume(peers: Dict[str, Dict],
@when('server.bricks.available')
@when('volume.needs.expansion')
@when('volume.created')
def check_for_expansion(peer) -> None:
"""
Possibly expand an existing volume