Bug 928781

Summary: hangs when mount a volume at own brick
Product: [Community] GlusterFS Reporter: gigahoge0001
Component: fuseAssignee: bugs <bugs>
Status: CLOSED DEFERRED QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: 3.3.1CC: bugs, gluster-bugs, ndevos
Target Milestone: ---Keywords: EasyFix, Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-14 19:40:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1040348    
Bug Blocks:    

Description gigahoge0001 2013-03-28 12:38:29 UTC
# ifconfig  | grep Bcast
          inet addr:192.168.0.30  Bcast:192.168.0.255  Mask:255.255.255.0

# gluster volume info

Volume Name: html
Type: Replicate
Volume ID: 
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 192.168.0.30:/var/www/html
Brick2: 192.168.0.44:/var/www/html

# mount -t glusterfs 192.168.0.30:/html /var/www/html/to.gluster

# ls -l /var/www/html/to.gluster

hangs this terminal.

Comment 1 Niels de Vos 2014-09-27 13:47:31 UTC
There should not be any mountpoint on a subdir in a brick. We can add a check in the fuse client to prevent this.

The check would see if the mountpoint or any of its parent directories have the 'trusted.glusterfs.volume-id' extended attribute set. If so, that directory is the root of the brick and mounting should be prevented.

This can get implemented in one, or both of:
- xlators/mount/fuse/src/fuse-bridge.c
- xlators/mount/fuse/utils/mount.glusterfs.in

Comment 2 Niels de Vos 2014-10-06 22:05:25 UTC
This has been fixed in mainline and 3.6 already. Bug 1040348 introduces additional warnings in the mount.glusterfs script.

The patch at http://review.gluster.org/5931 can probably get backported easily. Maybe we should include some related improvements introduced by other patches as well.

Comment 3 Niels de Vos 2014-11-27 14:54:17 UTC
The version that this bug has been reported against, does not get any updates from the Gluster Community anymore. Please verify if this report is still valid against a current (3.4, 3.5 or 3.6) release and update the version, or close this bug.

If there has been no update before 9 December 2014, this bug will get automatocally closed.