Call remove-brick only if no. of bricks > 0 (#56781) (#58635)

This commit is contained in:
Sachidananda Urs 2019-07-26 16:45:11 +05:30 committed by ansibot
parent 06c7b87613
commit 08b9e18d4f

View file

@ -548,7 +548,8 @@ def main():
if brick not in bricks_in_volume: if brick not in bricks_in_volume:
new_bricks.append(brick) new_bricks.append(brick)
if not new_bricks and len(all_bricks) < len(bricks_in_volume): if not new_bricks and len(all_bricks) > 0 and \
len(all_bricks) < len(bricks_in_volume):
for brick in bricks_in_volume: for brick in bricks_in_volume:
if brick not in all_bricks: if brick not in all_bricks:
removed_bricks.append(brick) removed_bricks.append(brick)