Bug 1521042 - Make a DHT subvolume go read-only when a subvolume crashes
Summary: Make a DHT subvolume go read-only when a subvolume crashes
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-05 16:56 UTC by Shyamsundar
Modified: 2019-07-15 06:11 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-07-15 06:11:49 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Shyamsundar 2017-12-05 16:56:54 UTC
Description of problem:

When subvolumes crash, users get messages like "No such file or directory" or "I/O Error" when doing operations that are cluster-wide, i.e., operations that touch the subvolume that has crashed. These include operations like mkdir() and rmdir() which are cluster-wide, as well as reads/writes/creates that hash to the dead subvolume. DHT does the right thing by disallowing operations to the subvolume -- it is effectively putting the subvolume in "read-only" mode to protect data, but it does not return the correct error. As a result, users of the filesystem think that the data is gone (in the case of "No such file or directory", or worse a blanket error that means nothing in the case of EIO). DHT sets the errno to ENOENT, which while makes sense in the context of DHT (No subvolume entry, hence ENOENT), the error it should bubble up to the user is EROFS, since it is putting the system in read-only mode. This diff changes the error messages to EROFS so the users get a more clear message of what is going on. Test Plan: Tested by downing a subvolume and checking error codes. Also ran other prove tests to make sure they pass.

Patch on 3.8 FB branch: https://review.gluster.org/#/c/17952/

Comment 1 Worker Ant 2017-12-05 16:58:06 UTC
REVIEW: https://review.gluster.org/18930 (dht: Make a DHT subvolume go read-only when a subvolume crashes) posted (#1) for review on master by Shyamsundar Ranganathan

Comment 2 Yaniv Kaul 2019-07-01 06:06:54 UTC
https://review.gluster.org/#/c/glusterfs/+/17952/ was merged long time ago - what's the latest status?

Comment 3 Amar Tumballi 2019-07-01 06:49:50 UTC
But that was specific to FB branch, which means, the patch was specifically developed with their usecase in mind. As per making this generic, there were concerns, and hence the patch for master was abandon'd. (and hence the bug got moved to NEW).

Comment 4 Amar Tumballi 2019-07-15 06:11:49 UTC
This approach has concerns with generic approach. We would need to plan for this with RIO (ie, in future).


Note You need to log in before you can comment on or make changes to this bug.