Bug 1341435 - successful mkdir from "bad" subvolume should be ignored while propagating result to higher layer
Summary: successful mkdir from "bad" subvolume should be ignored while propagating res...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: replicate
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Pranith Kumar K
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On: 1341429
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-01 04:35 UTC by Raghavendra G
Modified: 2018-04-16 18:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1341429
Environment:
Last Closed: 2018-04-16 18:19:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Raghavendra G 2016-06-01 04:35:32 UTC
+++ This bug was initially created as a clone of Bug #1341429 +++

Description of problem:

For Preop checks like [1], dentry operations like mkdir etc would rely on xattrs on parent (like dht layout). However, a "bad" subvolume of afr cannot make correct decision during preop check as the xattrs are not guaranteed to be correct. Imagine the following scenario:
a. mkdir succeeds on non-readable subvolume
b. fails on readable subvolume (may be because of layout xattrs didn't match).

afr here would report mkdir as success to parent xlators (here dht). However, since non-readable subvolume is not guaranteed to have correct xattrs, mkdir shouldn't have succeeded. Worse still, if mkdir on readable subvolume had failed because preop check failed (client in memory layout xattrs and layout xattrs persisted on disk didn't match), we would be ignoring a genuine failure and instead transforming it as a success.

dht is planning to introduce pre-operation checks on all dentry and lock (posix-locks, inodelk, entrylk) operations. So, without some sort of support from lower layers on xattr consistency (as these preops primarily rely on xattrs) it is impossible for a correct implementation.

[1] http://review.gluster.org/13885


Version-Release number of selected component (if applicable):
mainline, 3.7.11, 3.8

How reproducible:
bug was filed as a result of design discussion.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Ravishankar N 2017-08-29 11:45:20 UTC
Hi Du, Is this pre-operation check on all dentry and lock operations as mentioned in the bug description introduced in DHT yet?

Comment 3 Raghavendra G 2017-09-14 12:12:37 UTC
(In reply to Ravishankar N from comment #2)
> Hi Du, Is this pre-operation check on all dentry and lock operations as
> mentioned in the bug description introduced in DHT yet?

Its done in mkdir codepath [1].

[1] http://review.gluster.org/13885


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