Bug 877522 - Bogus "X is already part of a volume" errors
Summary: Bogus "X is already part of a volume" errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jeff Darcy
QA Contact:
URL:
Whiteboard:
: 875412 (view as bug list)
Depends On:
Blocks: 878872
TreeView+ depends on / blocked
 
Reported: 2012-11-16 18:51 UTC by Jeff Darcy
Modified: 2013-07-24 17:55 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:55:02 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Darcy 2012-11-16 18:51:34 UTC
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 21:48:47 UTC
http://review.gluster.org/#change,4201

Comment 2 Vijay Bellur 2012-11-23 10:35:22 UTC
CHANGE: http://review.gluster.org/4203 (glusterd: brick path availability check only for local bricks) merged in master by Vijay Bellur (vbellur)

Comment 3 Vijay Bellur 2012-11-23 10:40:14 UTC
CHANGE: http://review.gluster.org/4201 (glusterd: fix use of undefined realpath(3) result) merged in master by Vijay Bellur (vbellur)

Comment 4 krishnan parthasarathi 2012-12-24 10:45:55 UTC
*** 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.