Bug 761951 (GLUSTER-219)

Summary: Error message incorrect when fuse_mount() fails
Product: [Community] GlusterFS Reporter: Vijay Bellur <vijay>
Component: fuseAssignee: Anand Avati <aavati>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 2.0.6CC: chrisw, csaba, gluster-bugs, lakshmipathi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vijay Bellur 2009-08-17 04:16:03 UTC
When fuse_mount() fails, the following is seen:

[2009-08-17 09:38:19] D [fuse-bridge.c:2743:init] glusterfs-fuse: fuse_mount() failed with error Success on mount point /mnt/gfs
[2009-08-17 09:38:19] E [xlator.c:736:xlator_init_rec] xlator: Initialization of volume 'fuse' failed, review your volfile again

Appropriate error needs to be printed in the debug.

Comment 1 Csaba Henk 2009-08-17 05:32:40 UTC
The problem is that "Appropriate error needs to be printed in the debug" is not really possible to fulfil. We don't know anything here about the reasons of the failure. fuse_mount() doesn't set an errno (and we see "Success" there because that's what strerror(0) gives with glibc).

Best that can be done here is to separate error messages further, like

if (errno)
        gf_log (... strerror (errno) ...);
else
        gf_log (... lame excuse ...);

-- if it is worth for the effort at all.

Comment 2 Vijay Bellur 2009-08-17 05:55:55 UTC
(In reply to comment #1)
> The problem is that "Appropriate error needs to be printed in the debug" is not
> really possible to fulfil. We don't know anything here about the reasons of the
> failure. fuse_mount() doesn't set an errno (and we see "Success" there because
> that's what strerror(0) gives with glibc).
> 
> Best that can be done here is to separate error messages further, like
> 
> if (errno)
>         gf_log (... strerror (errno) ...);
> else
>         gf_log (... lame excuse ...);
> 
> -- if it is worth for the effort at all.

I think it is worth the effort since we are avoiding an oxymoron like "failed with error Success" and hence prevent a screenshot of glusterfs in DailyWTF :-)

Comment 3 Anand Avati 2009-08-17 18:38:18 UTC
PATCH: http://patches.gluster.com/patch/1057 in release-2.0 (fuse: don't say "Success" when mount fails)