Bug 1507007

Summary: Read-only option is ignored and volume mounted in r/w mode
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: fuseAssignee: bugs <bugs>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.10CC: bugs, csaba, e.lasman, ndevos, srangana, ssilverman
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1507002 Environment:
Last Closed: 2017-10-30 16:42:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1507002    
Bug Blocks:    

Description Niels de Vos 2017-10-27 12:05:02 UTC
+++ This bug was initially created as a clone of Bug #1507002 +++

Description of problem:
--read-only option is ignored and volume being mounted with RW permissions.

Version-Release number of selected component (if applicable):
/usr/sbin/glusterfs --version
glusterfs 3.8.4 built on Aug  9 2017 17:54:51
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

How reproducible:
Always

Steps to Reproduce:
1. Mount /usr/sbin/glusterfs --read-only --volfile-server=SERVER --volfile-id=/VOLUME-FILE /mnt/mountpoint

Actual results:
df -h | grep mountpoint
SERVER:/VOLUME-FILE on /mnt/mountpoint type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)

Expected results:
 df -h | grep mountpoint
SERVER:/VOLUME-FILE on /mnt/mountpoint type fuse.glusterfs (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)

Additional info:
cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 

uname -a
Linux ip-10-20-30-40 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12 11:03:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Comment 1 Shyamsundar 2017-10-30 16:00:41 UTC
This is not reproducible on,

1) 3.10.5 (works as expected)

2) 3.10.6 (works as expected)

3) 3.10 HEAD (for 3.10.7 release, works as expected)

The base OS was Fedora 26, with a centos7 container used to do the tests with 3.10.5 and 3.10.6. In both cases, when the mount was RO it was honored. In the test case for HEAD, a Fedora 26 instance was used and was found healthy as well.

I am removing this as a blocker for 3.10 hence, and possibly the bug can be closed as well unless I am missing something in my tests.

Comment 2 Yevgen Lasman 2017-10-30 16:29:37 UTC
The version mentioned in my report is 3.8.4. I suspect this is why I can't replicate the behavior.

Comment 3 Niels de Vos 2017-10-30 16:42:39 UTC
Thank Yevgen and Shyam!

In that case, we have to figure out which patch fixed this, and why it was not backported to other maintained branches.

Note that 3.8 is End-Of-Life, and will not receive any further updates. Please check the release schedule and consider moving to a newer version as soon as possible.

  https://www.gluster.org/release-schedule/