Bug 765380 (GLUSTER-3648)

Summary: [glusterfs-3.3.0qa11]: pathinfo xattr using hostname causes problems for machines with same hostname
Product: [Community] GlusterFS Reporter: Raghavendra Bhat <rabhat>
Component: posixAssignee: Venky Shankar <vshankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs, pkarampu, rwheeler, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.5.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-17 11:37:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raghavendra Bhat 2011-09-27 14:00:41 UTC
trusted.glusterfs.pathinfo xattr is using hostname for giving the pathinfo information as below.

getfattr -n trusted.glusterfs.pathinfo glusterfs-3.2.3
# file: glusterfs-3.2.3
trusted.glusterfs.pathinfo="(<REPLICATE:mirror-replicate-0> <POSIX:Centos1:/export/mirror/glusterfs-3.2.3> <POSIX:Centos1:/export/mirror/glusterfs-3.2.3>)

If 2 machines are having same hostname, then the path info will be the same.

Problem due to it:

machine1 - (hostname=host1, IP=x.x.x.x, export=/mnt/export)
machine2 - (hostname=host1, IP=y.y.y.y, export=/mnt/export)

Now Suppose a brick is running on machine1 and not on machine2. If machine1 goes down and comes back up, the glustershd running on machine2 will do getxattr on trusted.glusterfs.pathinfo to determine if the brick that came up is the one running in its machine only. Since the hostname and the export directories are same for both the machines, glustershd on machine2 will think that its own brick came up and try to self-heal.

Comment 1 Venky Shankar 2013-02-20 11:35:31 UTC
Well, for pathinfo to be more clear IP addresses can be used instead of hostnames (and an option that determine which one is needed).

But, doesn't the self heal daemon makes use of glusterd uuid instead of pathinfo. I recall self heal on the client making use of pathinfo.

Comment 2 Venky Shankar 2013-02-26 09:25:41 UTC
patch undergoing review: http://review.gluster.org/#change,4567

Comment 3 Anand Avati 2013-04-05 21:41:20 UTC
COMMIT: http://review.gluster.org/4567 committed in master by Anand Avati (avati) 
------
commit 24ee79345fc7346ef78b8adf54008ae77524026b
Author: Venky Shankar <vshankar>
Date:   Thu Feb 21 22:10:27 2013 +0530

    storage/posix: introduce node-uuid-pathinfo
    
    enabling this option has an effect on pathinfo xattr
    request returning <node-uuid>:<path> instead of the
    default - which is <hostname>:<path>.
    
    Change-Id: Ice1b38abf8e5df1568bab6d79ec0d53dfa520332
    BUG: 765380
    Signed-off-by: Venky Shankar <vshankar>
    Reviewed-on: http://review.gluster.org/4567
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: Jeff Darcy <jdarcy>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 4 Niels de Vos 2014-04-17 11:37:51 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report.

glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user