[Bugs] [Bug 1514683] Removal of bricks in volume isn' t prevented if remaining brick doesn't contain all the files

bugzilla at redhat.com bugzilla at redhat.com
Thu Nov 23 09:23:33 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1514683



--- Comment #2 from Nithya Balachandran <nbalacha at redhat.com> ---
Explanation of the approach:

In gf_cli_remove_brick:

if (cmd == GF_OP_CMD_COMMIT) get the rebalance status
Check the rebalance status for failed file migrations or in progress/failed
rebalance. If either of these are found, do not commit the operation. Display a
warning to the user asking them to retry the remove-brick after fixing the
issue or use force to commit the operation anyway.

The remove-brick commit and status operations use the 'count' in the dictionary
differently. Remove-brick commit requires 'count' to get the brick count.
Remove-brick status will increment and update the 'count' causing the rebalance
status processing to go wrong

So for now, for a remove-brick commit operation, the original 'count' is saved
in 'tmp-count' in the dict before sending the status request. If the rebalance
status indicates that the commit can go through, the value of 'count' in dict
is updated to the value of 'tmp-count' before the commit request is sent.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list