Bug 764641 (GLUSTER-2909) - replace brick of empty brick never says migration completed
Summary: replace brick of empty brick never says migration completed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2909
Product: GlusterFS
Classification: Community
Component: unclassified
Version: mainline
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-17 11:07 UTC by M S Vishwanath Bhat
Modified: 2016-06-01 01:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description M S Vishwanath Bhat 2011-05-17 11:07:06 UTC
replace brick of a empty brick never says the migration completed. The status always shows that, it still migrating.

[root@gluster-iso1 home]# gluster volume info

Volume Name: hosdu
Type: Distributed-Replicate
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 192.168.1.222:/home/brick1
Brick2: 192.168.1.222:/home/birck2
Brick3: 192.168.1.223:/home/brick3
Brick4: 192.168.1.223:/home/brick4

[root@gluster-iso1 home]# gluster volume replace-brick hosdu 192.168.1.223:/home/brick3/ 192.168.1.222:/home/brick3/ start
replace-brick started successfully

Here there was no file in , 223:/home/brick3/ 
Now when I run status i get following

[root@gluster-iso1 home]# gluster volume replace-brick hosdu 192.168.1.223:/home/brick3/ 192.168.1.222:/home/brick3/ status
Number of files migrated = 0       Current file=  
Ideally it should show that the Migration is complete or something similar.

Comment 1 Anand Avati 2011-05-30 05:49:31 UTC
PATCH: http://patches.gluster.com/patch/7264 in master (pump: Detect 'empty' brick and finish migration.)

Comment 2 krishnan parthasarathi 2011-05-30 07:27:29 UTC
The patch detects an empty source brick and logs the same. Additionally, it ensures that 'status' command gets an accurate response, ie. "Migration complete". 

Steps to verify fix:
- Create a volume with one or more bricks.
- Start replace brick with an empty source brick

- you must see an entry in the 'glusterfsd' log file saying "Empty source brick. Nothing to be done". 
- replace-brick status command must return "Migration complete" along with other relevant information.

Comment 3 Anand Avati 2011-05-31 13:11:06 UTC
PATCH: http://patches.gluster.com/patch/7316 in release-3.1 (pump: Detect 'empty' brick and finish migration.)

Comment 4 Anand Avati 2011-05-31 13:12:34 UTC
PATCH: http://patches.gluster.com/patch/7317 in release-3.2 (pump: Detect 'empty' brick and finish migration.)

Comment 5 M S Vishwanath Bhat 2011-06-02 07:40:04 UTC
With 3.2.1 this issue is fixed.


root@tortuga:/tmp# /opt/321/sbin/gluster volume create hosdu replica 2 tortuga:/tmp/brick1/ tortuga:/tmp/brick2/ tortuga:/tmp/brick3/ tortuga:/tmp/brick4/
Creation of volume hosdu has been successful. Please start the volume to access data.
root@tortuga:/tmp# /opt/321/sbin/gluster volume start hosdu
Starting volume hosdu has been successful
root@tortuga:/tmp# /opt/321/sbin/gluster volume info

Volume Name: hosdu 
Type: Distributed-Replicate
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: tortuga:/tmp/brick1
Brick2: tortuga:/tmp/brick2
Brick3: tortuga:/tmp/brick3
Brick4: tortuga:/tmp/brick4
root@tortuga:/tmp# gluster volume replace-brick hosdu tortuga:/tmp/brick4/ tortuga:/tmp/brick5/ start
replace-brick started successfully
root@tortuga:/tmp# gluster volume replace-brick hosdu tortuga:/tmp/brick4/ tortuga:/tmp/brick5/ status
Number of files migrated = 0        Migration complete
root@tortuga:/tmp# gluster volume replace-brick hosdu tortuga:/tmp/brick4/ tortuga:/tmp/brick5/ status
Number of files migrated = 0        Migration complete
root@tortuga:/tmp# gluster volume replace-brick hosdu tortuga:/tmp/brick4/ tortuga:/tmp/brick5/ commit
replace-brick commit successful

Also I saw the following in the 'glusterfsd' log file. 

[2011-06-02 16:03:43.588500] I [pump.c:534:gf_pump_traverse_directory] 0-hosdu-pump: Empty source brick. Nothing to be done.
[2011-06-02 16:03:43.597886] W [socket.c:1494:__socket_proto_state_machine] 0-tcp.hosdu-server: reading from socket failed. Error (Transport endpoint is not connected), peer (127.0.0.1:1000)


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