Description of problem:
The command "mount.glusterfs" always says "can't shift that many". This just happens on Ubuntu 16.04 on all versions i've tried (4.0, 3.12, 3.7)
Version-Release number of selected component (if applicable):
glusterfs 3.7, 3.12 and 4.0
Checked it on fresh ubuntu nodes (scaleway.com and digital-ocean). It happens on every fresh Ubuntu 16.04 node.
Steps to Reproduce:
1. Log In on an Ubuntu Node
2. Install the PPA or use the default Ubuntu version
3. Try to call mount.glusterfs
More information here:
Alex, I see that actually, changing the shell type worked for you.
Niels, should we change it in codebase itself?
Changing #!/bin/sh to #!/bin/bash is not recommended as it pulls in more dependencies (bash is considered large for container/cloud images).
It would be better to fix the problem in the script, and do the correct shifting of arguments (maybe call 'shift' 2x instead of 'shift 2'?).
REVIEW: https://review.gluster.org/21295 (fuse: prevent error message \"can't shift that many\") posted (#1) for review on master by Niels de Vos
COMMIT: https://review.gluster.org/21295 committed in master by "Amar Tumballi" <email@example.com> with a commit message- fuse: prevent error message "can't shift that many"
On systems where /bin/sh is not Bash, running plain mount.glusterfs
gives the unhelpful error "can't shift that many".
The argument parsing can be a little improved. Adding a check for the
number of arguments, minimal two (Gluster ip:/volume, and mountpoint),
but possibly more (-o, -v etc.).
With the additional check, running 'mount.glusterfs -h' now shows the
Usage: /sbin/mount.glusterfs <server>:<volume/subdir> <mountpoint> -o<options>
man 8 mount.glusterfs
To display the version number of the mount helper: /sbin/mount.glusterfs -V
Reported-by: Alexander Zimmermann <firstname.lastname@example.org>
Signed-off-by: Niels de Vos <email@example.com>
*** Bug 1182145 has been marked as a duplicate of this bug. ***
Fix is present only against mainline, moving the bug to mainline, for required tracking.
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-6.0, please open a new bug report.
glusterfs-6.0 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.