Bug 852754 - [PATCH] It's not possible to use mount/fuse with certain mount options, such as "context"
[PATCH] It's not possible to use mount/fuse with certain mount options, such ...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: fuse (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lubomir Rintel (GoodData, inactive)
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-29 09:46 EDT by Lubomir Rintel (GoodData, inactive)
Modified: 2013-07-24 13:25 EDT (History)
2 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:25:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lubomir Rintel (GoodData, inactive) 2012-08-29 09:46:25 EDT
Description of problem:

GlusterFS ignores the common options. (see comment in patch for explanation why is that not a good idea).

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

Since this is more of a feature request than a regression, all versions are likely affected. I'm hitting the problem with 3.3.0, the patch applies to master as well.

How reproducible:

Everytime.

Steps to Reproduce:

~♥ mount -t glusterfs -o context=system_u:object_r:gdc_export_rw_t:s0 rc-dfs01.int.getgooddata.com:Exporter /var/gdc/export
  
Actual results:

* A warning message:

unknown option context (ignored)

* Option not applied:

~♥ cat /proc/mounts |grep Exporter
rc-dfs01.int.getgooddata.com:Exporter /var/gdc/export fuse.glusterfs rw,relatime,user_id=0,group_id=0,allow_other,max_read=131072 0 0

* And indeed not in effect:

~♥ ls -ldZ /var/gdc/export
drwxr-xr-x. root root system_u:object_r:fusefs_t:s0    /var/gdc/export

Expected results:

* Option applied:

~♥ cat /proc/mounts |grep Exporter
rc-dfs01.int.getgooddata.com:Exporter /var/gdc/export fuse.glusterfs rw,relatime,user_id=0,group_id=0,allow_other,max_read=131072,context=system_u:object_r:gdc_export_rw_t:s0 0 0

* And working well:

~♥ ls -ldZ /var/gdc/export
drwxr-xr-x. root root system_u:object_r:gdc_export_rw_t    /var/gdc/export

Additional info:

I'll be submitting the patch to gerrit shortly, once I have a bug number. I guess it will be linked here, it contains a descriptive comment.
Comment 1 Lubomir Rintel (GoodData, inactive) 2012-08-29 09:56:17 EDT
The review is here: http://review.gluster.org/#change,3871
Comment 2 Niels de Vos 2012-10-31 05:51:25 EDT
This change has already been included in master on 16 september:

commit ab039cc10f8493c6964ddc5b1510219708a31c60
Author: Lubomir Rintel <lubo.rintel@gooddata.com>
Date:   Wed Aug 29 14:55:13 2012 +0200

    fuse-bridge: Pass unknown option down to fuse
    
    In Linux, certain "filesystem-specific" options (passed in string form in last
    argument to mount(2)), such as "rootcontext" or "context" are in fact common to
    all filesystems, including fuse. We should pass them down to the actual
    mount(2) call untouched.
    
    This is achieved by adding "fuse-mountopts" option to mount/fuse translator and
    adjusting the mount helper to propagate it with unrecognized options as they
    are encountered.
    
    BUG: 852754
    Change-Id: I309203090c02025334561be235864d8d04e4159b
    Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com>
    Reviewed-on: http://review.gluster.org/3871
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Anand Avati <avati@redhat.com>
Comment 3 Vijay Bellur 2013-02-07 21:18:14 EST
CHANGE: http://review.gluster.org/3877 (fuse: log options passed to fuse when mount fails) merged in master by Anand Avati (avati@redhat.com)

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