Bug 1576350 - mount.glusterfs do not support several xlator-options
Summary: mount.glusterfs do not support several xlator-options
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: 3.13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-09 09:08 UTC by Yannick Perret
Modified: 2018-06-20 18:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-06-20 18:25:31 UTC
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:

Attachments (Terms of Use)
Handle multiples xlator-options (690 bytes, patch)
2018-05-09 09:22 UTC, Yannick Perret
no flags Details | Diff

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:

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.

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