Bug 765380 - (GLUSTER-3648) [glusterfs-3.3.0qa11]: pathinfo xattr using hostname causes problems for machines with same hostname
[glusterfs-3.3.0qa11]: pathinfo xattr using hostname causes problems for mach...
Product: GlusterFS
Classification: Community
Component: posix (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Venky Shankar
Depends On:
  Show dependency treegraph
Reported: 2011-09-27 10:00 EDT by Raghavendra Bhat
Modified: 2014-04-17 07:37 EDT (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.5.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-04-17 07:37:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Raghavendra Bhat 2011-09-27 10:00:41 EDT
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 06:35:31 EST
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 04:25:41 EST
patch undergoing review: http://review.gluster.org/#change,4567
Comment 3 Anand Avati 2013-04-05 17:41:20 EDT
COMMIT: http://review.gluster.org/4567 committed in master by Anand Avati (avati@redhat.com) 
commit 24ee79345fc7346ef78b8adf54008ae77524026b
Author: Venky Shankar <vshankar@redhat.com>
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@redhat.com>
    Reviewed-on: http://review.gluster.org/4567
    Reviewed-by: Amar Tumballi <amarts@redhat.com>
    Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Anand Avati <avati@redhat.com>
Comment 4 Niels de Vos 2014-04-17 07:37:51 EDT
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

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