Bug 1040694 - rest api: Able to delete bricks while brick migration is occuring
Summary: rest api: Able to delete bricks while brick migration is occuring
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhsc-sdk
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Shubhendu Tripathi
QA Contact: Dustin Tsang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-11 22:27 UTC by Dustin Tsang
Modified: 2015-07-13 04:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 11:22:41 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dustin Tsang 2013-12-11 22:27:24 UTC
Description of problem:

Brick Deletion is successful while brick migration is in progress.
Brick deletion should be prevented from happening while migration is in progress.

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

How reproducible:
100% of the time

Steps to Reproduce:
1. create a distributed volume
2. populate volume with data so that every brick has data
3. via rest api start migration on 2 bricks
4. using collection brick delete the 2 bricks in step 3
 (DELETE /api/cluster/:id/glustervolume/:id/bricks)

Actual results:
deletion is successful

Expected results:
deletion should have failed, bricks should still be part of the volume.


Additional info:

Comment 1 Dusmant 2013-12-12 09:59:08 UTC
If the migration is already completed on those two bricks, then deletion should succeed. 

Dustin, can you confirm, whether migration was completed on those two bricks, before you fired the delete API on them?

Comment 3 Dustin Tsang 2013-12-12 23:14:23 UTC
Running gluster vol status showed that rebalance was in progress before deletion had occurred.

Comment 4 Shubhendu Tripathi 2013-12-13 11:22:41 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.


Note You need to log in before you can comment on or make changes to this bug.