Bug 811956 - [glusterfs-3.3.0qa34] - replace-brick start and commit can happen between two different bricks
[glusterfs-3.3.0qa34] - replace-brick start and commit can happen between two...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
pre-release
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: krishnan parthasarathi
:
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-04-12 07:46 EDT by M S Vishwanath Bhat
Modified: 2016-05-31 21:57 EDT (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:28:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description M S Vishwanath Bhat 2012-04-12 07:46:38 EDT
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 04:57:56 EDT
patch sent, reviewed @ http://review.gluster.com/3184
Comment 2 Anand Avati 2012-04-28 10:52:20 EDT
CHANGE: http://review.gluster.com/3184 (glusterd: Fail replace-brick subcmds on bricks other src/dst.) merged in master by Vijay Bellur (vijay@gluster.com)
Comment 3 M S Vishwanath Bhat 2012-05-14 04:23:49 EDT
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.