Bug 811956 - [glusterfs-3.3.0qa34] - replace-brick start and commit can happen between two different bricks
Summary: [glusterfs-3.3.0qa34] - replace-brick start and commit can happen between two...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: pre-release
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-04-12 11:46 UTC by M S Vishwanath Bhat
Modified: 2016-06-01 01:57 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:28:13 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description M S Vishwanath Bhat 2012-04-12 11:46:38 UTC
Description of problem:
Start the replace-brick between two-bricks say brick1 and brick2. Now I can get the proper status of the migration by specifying the wrong dest-brick (brick3). I can also commit the wrong dest-brick (brick3) and it gets reflected in the volume info and volume status. 

The volume was 2*2*2 dist-stripe-replicate.

Version-Release number of selected component (if applicable):
glusterfs-3.3.0qa34

How reproducible:
Often

Steps to Reproduce:
1. Create and start a 2*2*2 distributed-striped-replicated volume.
2. Create some data on the mountpoint, like untarring the linux kernel
3. Now start replace-brick between host1:brick1 and host2:brick2
4. Run replace-brick status for host1:brick1 and host2:brick3, it will succeed and will give proper status. ( I was running replace brick status between brick1 and brick3 in a while loop. It was giving me proper results)
5. Now run replace-brick commit between host1:brick1 and host2_brick3
  
Actual results:
Even the commit will succeed and will get reflected in volume info and volume status. Also since a new brick is committed it won't have any data in it. If the same issue is present in pure distribute volume, then it would lead to data loss.

Expected results:
replace-brick status and commit should error our and throw a message if the dest brick is different.

Additional info:
I have archived all the logs.

Comment 1 Amar Tumballi 2012-04-27 08:57:56 UTC
patch sent, reviewed @ http://review.gluster.com/3184

Comment 2 Anand Avati 2012-04-28 14:52:20 UTC
CHANGE: http://review.gluster.com/3184 (glusterd: Fail replace-brick subcmds on bricks other src/dst.) merged in master by Vijay Bellur (vijay)

Comment 3 M S Vishwanath Bhat 2012-05-14 08:23:49 UTC
With glusterfs-3.3.0qa41, Issue is resolved. 


[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 start
replace-brick started successfully
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status
Number of files migrated = 518       Current file= /kernel-source/linux-3.3/Documentation/block/writeback_cache_control.txt
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status
Number of files migrated = 40451        Migration complete 
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.69:/data/bricks/hosdu_brick3 commit
Incorrect source or destination brick
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick4 commit
Incorrect source or destination brick
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick4 status
Incorrect source or destination brick
[root@QA-30 ~]# 
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick2 172.17.251.68:/data/bricks/hosdu_brick3 status
brick: 172.17.251.69:/data/bricks/hosdu_brick2 does not exist in volume: hosdu
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status
Number of files migrated = 40451        Migration complete 
[root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 commit
replace-brick commit successful
[root@QA-30 ~]#


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