Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@sac
Copy link
Contributor

commented Jul 2, 2019

SUMMARY

Add an extra condition to call remove-brick operation. Now we check if the
number of bricks is greater than 0.

Earlier remove-brick was called if len(all_bricks) < len(bricks_in_volume) and
if all_bricks was 0, remove-brick was called anyway. We avoid this erroneous
behavior.

Fixes #56781

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gluster_volume

ADDITIONAL INFORMATION

Before the Fix:

TASK [Set volume options for SSL] *****************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: None
fatal: [10.70.43.171]: FAILED! => {"changed": false, "msg": "error running gluster (/usr/sbin/gluster --mode=script volume remove-brick volset 10.70.43.171:/data/r1 10.70.43.171:/data/r2 10.70.43.171:/data/r3 10.70.43.171:/data/r4 start) command (rc=1): volume remove-brick start: failed: Deleting all the bricks of the volume is not allowed\n"}

After the Fix:

TASK [Set volume options for SSL] *****************************************************************************
changed: [10.70.43.171]

PLAY RECAP ****************************************************************************************************
10.70.43.171               : ok=1    changed=1    unreachable=0    failed=0   

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

@sabose

sabose approved these changes Jul 3, 2019

@ansibot ansibot added the stale_ci label Jul 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.