Bug 764201 - (GLUSTER-2469) glusterd can render directories inaccessible
glusterd can render directories inaccessible
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
mainline
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kaushal
: Reopened
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2011-02-28 02:28 EST by tcp
Modified: 2015-12-01 11:45 EST (History)
4 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:31:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: master
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description tcp 2011-02-28 02:28:36 EST
I was trying to figure out how glusterd starts. Since it is the same binary as glusterfsd, it calls create_fuse_mount(). This quickly returns 0 if no mount point was specified, but if you did specify a mount point, it ends up making that directory a fuse mount. Any command on that directory hangs (for obvious reasons).

Now, I got a bit adventurous and ran glusterd as below:

# glusterd /var

and lo, every command after that hung up. The window manager wouldn't do many useful things. I had a root shell handy, but reboot wouldn't proceed. I had to forcefully power down the system to get out of this scenario. Bad!

We need to be careful about when to call create_fuse_mount(). We've got to be more defensive than depend on (the absence of) a variable to determine whether to call it or not.
Comment 1 Amar Tumballi 2011-07-15 02:03:29 EDT
'mount' should happen only when 'glusterfs' option is given. If not the last argument should not be treated as mountpoint.
Comment 2 Kaushal 2011-07-18 00:36:32 EDT
This patch should fix the problem
http://patches.gluster.com/patch/7961/
Comment 3 Amar Tumballi 2011-07-18 00:48:50 EDT
A bug gets resolved only after the patch is committed to the source repository. Keep it open till it gets committed.
Comment 4 Anand Avati 2011-07-21 06:38:44 EDT
CHANGE: http://review.gluster.com/5 (create_fuse_mount() now checks if it is a client process before performing) merged in master by Anand Avati (avati@gluster.com)
Comment 5 Raghavendra Bhat 2011-08-22 01:15:45 EDT
Tested with the mainline. gave glusterfsd <mount_point>, and did df -h, there was no hang and no message saying transport endpoint not connected. Tried with glusterd <mount point> and got the same results. 

Tried with glusterfs <mount point> and when I did df it said transport endpoint not connected (which is the expected result).
Comment 6 Sachidananda Urs 2011-10-08 23:05:54 EDT
Few suggestions:

glusterfsd.c:main
* Instead of calling create_fuse_mount and making checks on process_mode, call create_fuse_mount only if process_mode is client process.

glusterfsd.c:create_fuse_mount
* If mount point is not present, don't log it as a TRACE log, user has to know why mount failed.

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