gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.63k stars 1.08k forks source link

grep command warning when when mounting glusterfs #4073

Open michaeltraxler opened 1 year ago

michaeltraxler commented 1 year ago

Description of problem:

When mounting a glusterfs with $ mount -t glusterfs servername:glustername /mnt the following warning is issued: grep: warning: stray \ before -

The exact command to reproduce the issue: mount -t glusterfs servername:glustername /mnt

The full output of the command that failed: grep: warning: stray \ before - Expected results: No warning from the grep command.

Mandatory info: - The output of the gluster volume info command:

Volume Name: lgad Type: Distribute Volume ID: 8912701e-f27c-46d2-ac60-02cd9739543e Status: Started Snapshot Count: 0 Number of Bricks: 2 Transport-type: tcp Bricks: Brick1: server1:/d/glusterfs/lgad/brick1/glusterfs Brick2: server2:/d/glusterfs/lgad/brick1/glusterfs Options Reconfigured: transport.address-family: inet storage.fips-mode-rchecksum: on features.bitrot: on features.scrub: Active

- The output of the gluster volume status command:

I think this is irrelevant for the warning message.

- The output of the gluster volume heal command: I think this is irrelevant for the warning message.

**- Provide logs present on following locations of client and server nodes - /var/log/glusterfs/

I think this is irrelevant for the warning message.

**- Is there any crash ? Provide the backtrace and coredump

no.

Additional info:

- The operating system / glusterfs version:

glusterfs 11.0

Description: openSUSE Tumbleweed Release: 20230322

Centaro0 commented 11 months ago

I am experiencing the same issue on Manjaro with gluster 10.3 and grep 3.11, but it does not come up on Debian 12.1 with gluster 10.3 and grep 3.8.

ssharunas commented 2 months ago

The problem in file /usr/bin/mount.glusterfs, line:

grep_ret=$(echo ${mount_point} | grep '^\-o');

I'm not sure what is checked here, but I suppose '\' is for escaping '-'? Is it really needed? Or is it supposed to be grep '^\\-o'?

aravindavk commented 2 months ago

The issue is fixed here: https://github.com/gluster/glusterfs/pull/4275