Bug 1503519 - default timeout of 5min not honored for analyzing split-brain files post setfattr replica.split-brain-heal-finalize
Summary: default timeout of 5min not honored for analyzing split-brain files post setf...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Karthik U S
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1360331 1514380 1514388
TreeView+ depends on / blocked
 
Reported: 2017-10-18 11:09 UTC by Karthik U S
Modified: 2017-12-08 17:44 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.13.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1360331
: 1514380 1514388 (view as bug list)
Environment:
Last Closed: 2017-12-08 17:44:30 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Comment 1 Karthik U S 2017-10-18 11:11:42 UTC
Description of problem:
=======================
a file in split-brain can be still read or accessed from a fuse mount by pointing to the desired brick by using following steps:
1)first identify the split-brain file
2)confirm from the fuse mount using getfattr -n replica.split-brain-status <split-brain file>
Now as the file is in split-brain the user gets I/O error
But the user can analyze the split brain file by getting access by setting "setfattr -n replica.split-brain-choice -v "choiceX" <path-to-
file>"
where -V is for the brick

However, the expected default time-out is 5min, post which the file should become again inaccessible.
However, this doesnt work as the user can keep accessing the file indefinitely 
you can also refer admin do 10.11.2.1:Recovering File Split-brain from the Mount Point -->>Setting the split-brain-choice on the file

Steps to Reproduce:
1.create a data/metadata split brain
2.on fuse mount use "setfattr -n replica.split-brain-choice -v "choiceX" <path-to-file>" to access the splitbrain file from fuse mount
3.the split brain file should be accessible only for 5min after using above command

Actual results:
=================
the splitbrain file is accessible without any timebound

Expected results:
=====================
the splitbrain file should be  accessible for default time of 5min

Comment 2 Worker Ant 2017-10-18 11:27:35 UTC
REVIEW: https://review.gluster.org/18546 (cluster/afr: Honor default timeout of 5min for analyzing split-brain files) posted (#1) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 3 Worker Ant 2017-10-24 13:33:34 UTC
REVIEW: https://review.gluster.org/18546 (cluster/afr: Honor default timeout of 5min for analyzing split-brain files) posted (#2) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 4 Worker Ant 2017-10-25 07:32:35 UTC
REVIEW: https://review.gluster.org/18546 (cluster/afr: Honor default timeout of 5min for analyzing split-brain files) posted (#3) for review on master by Karthik U S (ksubrahm@redhat.com)

Comment 5 Worker Ant 2017-10-30 15:57:42 UTC
COMMIT: https://review.gluster.org/18546 committed in master by  

------------- cluster/afr: Honor default timeout of 5min for analyzing split-brain files

Problem:
After setting split-brain-choice option to analyze the file to resolve
the split brain using the command
"setfattr -n replica.split-brain-choice -v "choiceX" <path-to-file>"
should allow to access the file from mount for default timeout of 5mins.
But the timeout was not honored and was able to access the file even after
the timeout.

Fix:
Call the inode_invalidate() in afr_set_split_brain_choice_cbk() so that
it will triger the cache invalidate after resetting the timer and the
split brain choice. So the next calls to access the file will fail with EIO.

Change-Id: I698cb833676b22ff3e4c6daf8b883a0958f51a64
BUG: 1503519
Signed-off-by: karthik-us <ksubrahm@redhat.com>

Comment 6 Worker Ant 2017-11-17 09:37:36 UTC
REVIEW: https://review.gluster.org/18795 (cluster/afr: Honor default timeout of 5min for analyzing split-brain files) posted (#1) for review on release-3.12 by Karthik U S

Comment 7 Worker Ant 2017-11-17 09:42:53 UTC
REVISION POSTED: https://review.gluster.org/18795 (cluster/afr: Honor default timeout of 5min for analyzing split-brain files) posted (#2) for review on release-3.12 by Karthik U S

Comment 8 Shyamsundar 2017-12-08 17:44:30 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.13.0, please open a new bug report.

glusterfs-3.13.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/


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