Bug 1040462

Summary: rest-api: brick deletion was allowed during rebalance.
Product: Red Hat Gluster Storage Reporter: Dustin Tsang <dtsang>
Component: rhsc-sdkAssignee: Shubhendu Tripathi <shtripat>
Status: CLOSED NOTABUG QA Contact: Dustin Tsang <dtsang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.1CC: dpati, dtsang, knarra, mmahoney, mmccune, pprakash, rhs-bugs, ssampat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-13 10:54:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dustin Tsang 2013-12-11 13:29:02 UTC
Description of problem:

Brick deletion was allowed to occur during migration. 
(for example: DELETE /api/clusters/5486f353-454e-45d8-a3d8-368b7968148d/glustervolumes/f7ec0f8e-f456-42dd-a930-c61377d7e7eb/bricks)

Version-Release number of selected component (if applicable):
rhsc-cb10

How reproducible:
100% of the time

Steps to Reproduce:
1. create a dist volume in rhsc
2. create a large data set on the volume
3. start rebalance on the volume
4. perform a delete to 90% of the bricks on the volume


Actual results:
Http 200 status received.
brick deletion was successful

Expected results:
Brick deletion should not have succeeded.

Additional info:

Comment 1 Dustin Tsang 2013-12-11 13:30:50 UTC
correction to Comment#0:  description should read:
Brick deletion was allowed to occur during rebalance.

Comment 3 Dusmant 2013-12-13 10:54:18 UTC
Dustin,
   This is an expected behaviour, because the REST API is using the Force option by default. So, i am moving the bug to CLOSED state, 

This is what the Gluster team told us...

'remove-brick commit[force]' will remove the specified brick(s) even if there is an ongoing rebalance. Remove-brick has checks to prevent this, but the force option will cause the checks to be overridden. This is unsafe behavior IMO, but it is what is happening now.