Bug 877522 - Bogus "X is already part of a volume" errors
Bogus "X is already part of a volume" errors
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
mainline
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Jeff Darcy
:
: 875412 (view as bug list)
Depends On:
Blocks: 878872
  Show dependency treegraph
 
Reported: 2012-11-16 13:51 EST by Jeff Darcy
Modified: 2013-07-24 13:55 EDT (History)
3 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:55:02 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 Jeff Darcy 2012-11-16 13:51:34 EST
These have been making people in IRC scratch their heads for some times, but I just happened to find a reproducible case on my own systems today.  The problem is that glusterd_is_brickpath_available is continuing to use the output string from realpath(3) even when that failed.  The man page has this to say:

    Otherwise it returns  a  NULL  pointer,  and  the  contents  of  the  array
    resolved_path are undefined, and errno is set to indicate the error.

In this case, "undefined" seems to mean that it's acting like basename(3) in that it chops off the last path component.  Thus, any brick that is a *sibling* of the one that we're trying to use is treated as its parent, causing the spurious failures.  In my case I had this:

    gfs2:/export/sdb/dht was already part of a volume
    gfs2:/export/sdb/afr couldn't be used for a new volume

Our use of realpath(3) for non-local paths is highly suspicious in general, but I'm not fixing that right now.  In a moment I'll post a patch just to avoid the use of the undefined result.
Comment 1 Jeff Darcy 2012-11-16 16:48:47 EST
http://review.gluster.org/#change,4201
Comment 2 Vijay Bellur 2012-11-23 05:35:22 EST
CHANGE: http://review.gluster.org/4203 (glusterd: brick path availability check only for local bricks) merged in master by Vijay Bellur (vbellur@redhat.com)
Comment 3 Vijay Bellur 2012-11-23 05:40:14 EST
CHANGE: http://review.gluster.org/4201 (glusterd: fix use of undefined realpath(3) result) merged in master by Vijay Bellur (vbellur@redhat.com)
Comment 4 krishnan parthasarathi 2012-12-24 05:45:55 EST
*** Bug 875412 has been marked as a duplicate of this bug. ***

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