[Bugs] [Bug 1311236] New: Bug in /sbin/mount.glusterfs with option before -o

bugzilla at redhat.com bugzilla at redhat.com
Tue Feb 23 16:47:59 UTC 2016


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

            Bug ID: 1311236
           Summary: Bug in /sbin/mount.glusterfs with option before -o
           Product: GlusterFS
           Version: 3.7.8
         Component: glusterd
          Assignee: bugs at gluster.org
          Reporter: s.delcroix at dfi.ch
                CC: bugs at gluster.org



Description of problem:

When you use an option before -o (eg -n) "mount" options are suppressed 

When you use systemd to mount gluster filesystem it adds "-n" option before
"-o" and filesystem are not mounted correctly.

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


How reproducible:

mount.glusterfs gluster-a:/gv-app2 /var/www -n -o
rw,acl,direct-io-mode=disable,backupvolfile-server=gluster-b,_netdev

Steps to Reproduce:
1.
2.
3.

Actual results:

Does not mount with acl option

Expected results:

Moutn with acl option

Additional info:

I've found the issue :
in /sbin/mount.glusterfs this part of code use "shift" and it should not have
to

--8<----------------------------
while getopts "Vo:hn" opt; do
        case "${opt}" in
            o)
                parse_options ${OPTARG};
                shift 2;
                ;;
            n)
                shift 1;
                ;;
            V)
                ${cmd_line} -V;
                exit 0;
                ;;
            h)
                print_usage;
                exit 0;
                ;;
            ?)
                print_usage;
                exit 0;
                ;;
        esac
    done

--8<----------------------------

you should patch with this

--8<----------------------------
--- /sbin/mount.glusterfs       2016-02-23 16:19:16.192588339 +0100
+++ /sbin/mount.glusterfs.ori   2016-02-09 07:30:14.000000000 +0100
@@ -570,8 +570,10 @@
         case "${opt}" in
             o)
                 parse_options ${OPTARG};
+               shift 2;
                 ;;
             n)
+               shift 1;
                 ;;
             V)
                 ${cmd_line} -V;
--8<----------------------------

"shift" is already handled by getopts.

-- 
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