[Bugs] [Bug 1804786] New: mount.glusterfs strips off "/" from subdir-mounts

bugzilla at redhat.com bugzilla at redhat.com
Wed Feb 19 16:00:03 UTC 2020


https://bugzilla.redhat.com/show_bug.cgi?id=1804786

            Bug ID: 1804786
           Summary: mount.glusterfs strips off "/" from subdir-mounts
           Product: GlusterFS
           Version: mainline
            Status: NEW
         Component: scripts
          Severity: low
          Assignee: bugs at gluster.org
          Reporter: mail at aloibl.de
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community



Description of problem:
the mount.glusterfs code to handle subdir-mounts always strips off the "/" in
front of the volume name,
so when mounting "server:/volname/subdir" becomes "server:volname/subdir"

Version-Release number of selected component (if applicable):
every release since v3.13.0beta – as commit 590ae48c6 introduced this behaviour
initially here:
https://github.com/gluster/glusterfs/commit/590ae48c6#diff-7829823331339149cb845ff035efff54R667-R669

How reproducible: 100%

Steps to Reproduce:
1. mount -t glusterfs server:/volname/subdir /mnt
2. findmnt -no SOURCE /mnt

Actual results:
server:volname/subdir

Expected results:
server:/volname/subdir

Additional info:
it is common for configuration management and other scripts to expect that the
device-string supplied to mount matches the source that actually gets mounted

ansible for example expects ":/" to appear in the device of a network mount,
otherwise the mount is ignored:
https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/hardware/linux.py#L505

(ugly) workaround that prevents "/" from being stripped:
# mount -t glusterfs -osubdir-mount=subdir server:/volname /mnt
# findmnt -no SOURCE /mnt
server:/volname/subdir

(this workaround is another proof of the inconsistent handling of subdir-mounts
and why this issue should be considered a bug)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list