Bug 1173513

Summary: [HC] - mount.glusterfs fails to check return of mount command.
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: fuseAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.1CC: bugs, hchiramm, ndevos, rabhat, sbonazzo, ylavi
Target Milestone: ---Keywords: EasyFix, Patch, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-v3.6.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1128165 Environment:
Last Closed: 2016-02-04 15:08:20 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: 1128165    
Bug Blocks: 1163723, 1173669    

Description Niels de Vos 2014-12-12 10:42:47 UTC
+++ This bug was initially created as a clone of Bug #1128165 +++

Description of problem:

Current version of mount.glusterfs does not check the return of mount command and it causes failure in fetching proper return of the same.



Version-Release number of selected component (if applicable):

GlusterFS-3.6

How reproducible:

[root@node ~]# mount -t glusterfs 10.19.96.13:test_vol2 /mnt/h

[1]

[root@node ~]# mount|grep mnt
[root@node ~]# tail -n 10 /var/log/glusterfs/mnt-h.log 
[2014-08-08 09:54:28.054719] I [glusterfsd-mgmt.c:1817:mgmt_rpc_notify] 0-glusterfsd-mgmt: Exhausted all volfile servers
[2014-08-08 09:54:28.054920] W [glusterfsd.c:1182:cleanup_and_exit] (--> 0-: received signum (1), shutting down
[2014-08-08 09:54:28.054955] I [fuse-bridge.c:5561:fini] 0-fuse: Unmounting '/mnt/h'.
[2014-08-08 13:08:56.651005] I [MSGID: 100030] [glusterfsd.c:1998:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 3.6.0.22 (args: /usr/sbin/glusterfs --volfile-server=10.19.96.13 --volfile-id=test_vol2 /mnt/h)
[2014-08-08 13:08:56.769335] E [socket.c:2169:socket_connect_finish] 0-glusterfs: connection to 10.19.96.13:24007 failed (Connection refused)
[2014-08-08 13:08:56.769409] E [glusterfsd-mgmt.c:1811:mgmt_rpc_notify] 0-glusterfsd-mgmt: failed to connect with remote-host: 10.19.96.13 (Transport endpoint is not connected)
[2014-08-08 13:08:56.769426] I [glusterfsd-mgmt.c:1817:mgmt_rpc_notify] 0-glusterfsd-mgmt: Exhausted all volfile servers
[2014-08-08 13:08:56.769622] W [glusterfsd.c:1182:cleanup_and_exit] (--> 0-: received signum (1), shutting down
[2014-08-08 13:08:56.769656] I [fuse-bridge.c:5561:fini] 0-fuse: Unmounting '/mnt/h'.
[2014-08-08 13:08:56.779998] W [glusterfsd.c:1182:cleanup_and_exit] (--> 0-: received signum (15), shutting down
[root@node ~]# 

Even-though mount failed, there is no way to identify whether it was a successful mount or not.

[1] No output returned to the user.

With the patch :

[root@node ~]# mount -t glusterfs 10.19.96.13:test_vol2 /mnt/h
Mount failed. Please check the log file for more details.
[root@node ~]# 


Actual results:

No error returned for the user.

Expected results:

If failed, it should be messaged to the user.


Additional info:

--- Additional comment from Sandro Bonazzola on 2014-12-12 11:06:35 CET ---

Still reproducible with 

# rpm -qa |grep gluster |sort
glusterfs-3.6.1-1.el7.x86_64
glusterfs-api-3.6.1-1.el7.x86_64
glusterfs-cli-3.6.1-1.el7.x86_64
glusterfs-fuse-3.6.1-1.el7.x86_64
glusterfs-libs-3.6.1-1.el7.x86_64
glusterfs-rdma-3.6.1-1.el7.x86_64
glusterfs-server-3.6.1-1.el7.x86_64

--- Additional comment from Niels de Vos on 2014-12-12 11:41:21 CET ---

http://review.gluster.org/8438 has been committed in the master branch, and should get backported to release-3.6 and 3.5. I'll clone this bug so that we can post the patches.

Comment 1 Anand Avati 2014-12-12 10:47:17 UTC
REVIEW: http://review.gluster.org/9270 (mount: Verify mount failure in mount.glusterfs wrapper.) posted (#1) for review on release-3.6 by Niels de Vos (ndevos)

Comment 2 Anand Avati 2014-12-13 06:03:29 UTC
COMMIT: http://review.gluster.org/9270 committed in release-3.6 by Raghavendra Bhat (raghavendra) 
------
commit f3b3e35b8a2c49514284bf1e57faa9192509fd5b
Author: Niels de Vos <ndevos>
Date:   Fri Dec 12 11:45:11 2014 +0100

    mount: Verify mount failure in mount.glusterfs wrapper.
    
    The result of mount command execution is not checked properly, thus
    no proper message given for the end user. This patch fix the same.
    
    Cherry picked from commit 76b72680017c836eff8805ea0339f7827ba3e561:
    > Bug Id: 1128165
    > Change-Id: I3882e34e840ed15b5ce48ed5e1ad51208e2be913
    > Signed-off-by: Humble Chirammal <hchiramm>
    > Reviewed-on: http://review.gluster.org/8438
    > Tested-by: Gluster Build System <jenkins.com>
    > Reviewed-by: Niels de Vos <ndevos>
    
    BUG: 1173513
    Change-Id: I3882e34e840ed15b5ce48ed5e1ad51208e2be913
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/9270
    Reviewed-by: Humble Devassy Chirammal <humble.devassy>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra Bhat <raghavendra>
    Tested-by: Raghavendra Bhat <raghavendra>

Comment 3 Kaushal 2016-02-04 15:08:20 UTC
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-v3.6.2, please open a new bug report.

glusterfs-v3.6.2 has been announced on the Gluster mailinglists [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://blog.gluster.org/2015/01/glusterfs-3-6-2-ga-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user