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:
parent
0db1daa12f
commit
aa9a6293b4
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue