Bug 1210689 - BitRot :- Files marked as 'Bad' should not be accessible from mount
Summary: BitRot :- Files marked as 'Bad' should not be accessible from mount
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: bitrot
Version: mainline
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact: RajeshReddy
bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks: qe_tracker_everglades 1236289 1241529
TreeView+ depends on / blocked
 
Reported: 2015-04-10 11:23 UTC by Rachana Patel
Modified: 2016-06-16 12:49 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1224227 1236289 1241529 (view as bug list)
Environment:
Last Closed: 2016-06-16 12:49:31 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Rachana Patel 2015-04-10 11:23:37 UTC
Description of problem:
=======================
If file is marked as 'Bad' then any access to that file from mount should get 'EIO' error till its recovered .(recovery using self heal/EC or manual)


Version-Release number of selected component (if applicable):
=============================================================
3.7dev-0.952.gita7f1d08.el6.x86_64

How reproducible:
=================
always

Steps to Reproduce:
===================
1. create and mount volume.
2. enable bitrot
3. create file
4. modify file from backend(not from mount)
5. Once file is marked as bad, try to access it from mount.

[]# getfattr -d -m .  /pavanbrick3/*/f9 -e hex
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick3/r1/f9
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a64656661756c745f743a733000
trusted.gfid=0xc2ca6098ab304d9c9027df491e07c0f7
trusted.glusterfs.bad-file=0x3100
trusted.glusterfs.bit-rot.signature=0x010000000000000004000000000000009ad89c03b457431979ab5c44131dda04d1bc1652271cc7c37a91c3a10de6a6b0
trusted.glusterfs.bit-rot.version=0x0400000000000000552623db00042680

Actual Result:-
===============
[root@rhs-client37 rac1]# cat f9
new
new
new
new
something
corrupt


Expect Result:-
===============
 Files marked as 'Bad' should not be accessible from mount and user should get EIO error

Comment 2 Anand Avati 2015-06-09 11:35:04 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#2) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 3 Anand Avati 2015-06-16 20:12:55 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#3) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 4 Anand Avati 2015-06-21 13:09:31 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#4) for review on master by Venky Shankar (vshankar@redhat.com)

Comment 5 Anand Avati 2015-06-24 09:07:26 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#5) for review on master by Venky Shankar (vshankar@redhat.com)

Comment 6 Anand Avati 2015-06-24 20:01:00 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#7) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 7 Anand Avati 2015-06-24 20:01:02 UTC
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#1) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 8 Anand Avati 2015-06-26 06:18:40 UTC
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#2) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 9 Anand Avati 2015-06-26 06:18:47 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#8) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 10 Anand Avati 2015-06-26 10:38:39 UTC
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#3) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 11 Anand Avati 2015-06-26 15:11:24 UTC
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#4) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 12 Anand Avati 2015-06-26 15:11:26 UTC
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#10) for review on master by Raghavendra Bhat (raghavendra@redhat.com)

Comment 13 Anand Avati 2015-06-27 11:17:36 UTC
COMMIT: http://review.gluster.org/11126 committed in master by Venky Shankar (vshankar@redhat.com) 
------
commit 15dcfe98caa573e87d898cb66c13ef7187730c6b
Author: Raghavendra Bhat <raghavendra@redhat.com>
Date:   Tue May 26 19:22:14 2015 +0530

    features/bit-rot-stub: deny access to bad objects
    
    * Access to bad objects (especially operations such as open, readv, writev)
      should be denied to prevent applications from getting wrong data.
    
    * Do not allow anyone apart from scrubber to set bad object xattr.
    
    * Do not allow bad object xattr to be removed.
    
    Change-Id: Ia9185a067233a9f26e3d41d41d11d9a4eb0da827
    BUG: 1210689
    Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
    Signed-off-by: Venky Shankar <vshankar@redhat.com>
    Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
    Reviewed-on: http://review.gluster.org/11126
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>

Comment 14 Anand Avati 2015-06-27 11:18:50 UTC
COMMIT: http://review.gluster.org/11389 committed in master by Venky Shankar (vshankar@redhat.com) 
------
commit 0a24b8f2be5f8b124d76a13f2a4b6cb9058c9a30
Author: Raghavendra Bhat <raghavendra@redhat.com>
Date:   Wed Jun 24 20:06:01 2015 +0530

    features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs
    
    * setxattr and {f}removexattr of versioning, signature and bad-file xattrs are
      returned with error.
    
    Change-Id: Ib423466195d1d8e4c6f80c2906a574e21ed624fb
    BUG: 1210689
    Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
    Reviewed-on: http://review.gluster.org/11389
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Venky Shankar <vshankar@redhat.com>

Comment 15 Nagaprasad Sathyanarayana 2015-10-25 15:19:01 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 16 Niels de Vos 2016-06-16 12:49:31 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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