Bug 1576350

Summary: mount.glusterfs do not support several xlator-options
Product: [Community] GlusterFS Reporter: Yannick Perret <yannick.perret>
Component: scriptsAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.13CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-20 18:25:31 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:
Attachments:
Description Flags
Handle multiples xlator-options none

Description Yannick Perret 2018-05-09 09:08:09 UTC
Description of problem:
When mounting a volume using 'mount' command, it is possible to pass xlator options using '-oxlator-option=key=value'.
In my case I need to pass two options to a xlator (created by me).
Adding two xlator-options do not does the trick: both
'-oxlator-option=key1=val1 -oxlator-option=key2=val2' or '-oxlator-option=key1=val1,xlator-option=key2=val2' lead to only last value to be transmited to 'glusterfs' command.


Version-Release number of selected component (if applicable):
I'm using 3.13.2 compiled from sources.

How reproducible:
Always.

Steps to Reproduce:
1. mount -t glusterfs -oxlator-option=key1=val1 -oxlator-option=key2=val2 /path/to/volfile /path/to/mountpoint

Actual results:
Executed command is:
/usr/local/sbin/glusterfs --xlator-option=key2=val2 --process-name fuse --volfile=/path/to/volfile /path/to/mountpoint

Expected results:
Executed command should be:
/usr/local/sbin/glusterfs --xlator-option=key1=val1 --xlator-option=key2=val2 --process-name fuse --volfile=/path/to/volfile /path/to/mountpoint

Additional info:
I patched /sbin/mount.glusterfs to handle one or two values for 'xlator_option' (by just setting xlator_option2 if xlator_option is still set), and it works as expected in this case.
Script 'mount.glusterfs' should be corrected to handle an arbitrary number of values for xlator_option (and this may also applies to other potentialy-multi-valued options).

Comment 1 Yannick Perret 2018-05-09 09:22:57 UTC
Created attachment 1433663 [details]
Handle multiples xlator-options

Comment 2 Yannick Perret 2018-05-09 09:23:46 UTC
Added a very simple patch against mount.glusterfs to handle multiple 'xlator-option' values.

Comment 3 Shyamsundar 2018-06-20 18:25:31 UTC
This bug reported is against a version of Gluster that is no longer maintained (or has been EOL'd). See https://www.gluster.org/release-schedule/ for the versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline gluster repository, request that it be reopened and the Version field be marked appropriately.