Bug 1432048

Summary: Opening a file in RDRW mode when the quorum is not reached returns 0 instead of -1.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ramakrishna Reddy Yekulla <rreddy>
Component: glusterfsAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED WORKSFORME QA Contact: Bala Konda Reddy M <bmekala>
Severity: medium Docs Contact:
Priority: low    
Version: rhgs-3.3CC: amukherj, atumball, pprakash, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-20 05:00:11 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:    
Bug Blocks: 1355689    

Description Ramakrishna Reddy Yekulla 2017-03-14 12:16:34 UTC
Description of problem:

While using a BlotDB in CNS-3.4+, the following has been observed that when the db file has been mounted on GlusterFS. 
 


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


How reproducible:


Steps to Reproduce:
1. 
2.
3.

Actual results:
open() with O_RDWR on a RO-filesystem returns 0 with NO ERROR. 
open() with O_RDWR on a RO file returns -1 with error == EACCESS


Expected results:
open() with O_RDWR on a RO-filesystem returns -1 with errno == EROFS
open() with O_RDWR on a RO file returns -1 with error == EACCESS


Additional info:

Comment 4 Amar Tumballi 2018-04-02 07:52:53 UTC
Can you test using 'gluster volume set <vol> open-behind disable' ?

If works, I recommend enabling that option for all volumes in CNS (if this is critical behavior). Else, will close with a known-issue.

Comment 6 Atin Mukherjee 2018-11-19 08:15:18 UTC
Is this behaviour seen in latest OCS releases?

Comment 7 Amar Tumballi 2018-11-20 05:00:11 UTC
Considering there was no update on bug other than the initial filing, and not reported by the QE during any of OCS/CNS testing, closing it as WORKSFORME. Please re-open if seen again.