Bug 1241529 - 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 EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: bitrot
Version: 3.7.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
bugs@gluster.org
URL:
Whiteboard:
Depends On: 1210689
Blocks: qe_tracker_everglades 1236289
TreeView+ depends on / blocked
 
Reported: 2015-07-09 12:23 UTC by Raghavendra Bhat
Modified: 2023-09-14 03:01 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.7.3
Clone Of: 1210689
Environment:
Last Closed: 2017-03-08 10:54:34 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2015-07-09 12:23:39 UTC
+++ This bug was initially created as a clone of Bug #1210689 +++

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

--- Additional comment from John Skeoch on 2015-04-19 20:24:58 EDT ---

User racpatel's account has been closed

--- Additional comment from Anand Avati on 2015-06-09 07:35:04 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-16 16:12:55 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-21 09:09:31 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-24 05:07:26 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-24 16:01:00 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-24 16:01:02 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-26 02:18:40 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-26 02:18:47 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-26 06:38:39 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-26 11:11:24 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-26 11:11:26 EDT ---

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)

--- Additional comment from Anand Avati on 2015-06-27 07:17:36 EDT ---

COMMIT: http://review.gluster.org/11126 committed in master by Venky Shankar (vshankar) 
------
commit 15dcfe98caa573e87d898cb66c13ef7187730c6b
Author: Raghavendra Bhat <raghavendra>
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>
    Signed-off-by: Venky Shankar <vshankar>
    Signed-off-by: Raghavendra Bhat <raghavendra>
    Reviewed-on: http://review.gluster.org/11126
    Tested-by: NetBSD Build System <jenkins.org>

--- Additional comment from Anand Avati on 2015-06-27 07:18:50 EDT ---

COMMIT: http://review.gluster.org/11389 committed in master by Venky Shankar (vshankar) 
------
commit 0a24b8f2be5f8b124d76a13f2a4b6cb9058c9a30
Author: Raghavendra Bhat <raghavendra>
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>
    Reviewed-on: http://review.gluster.org/11389
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Venky Shankar <vshankar>

Comment 1 Anand Avati 2015-07-09 12:29:03 UTC
REVIEW: http://review.gluster.org/11603 (features/bit-rot-stub: deny access to bad objects) posted (#1) for review on release-3.7 by Raghavendra Bhat (raghavendra)

Comment 2 Anand Avati 2015-07-09 12:29:05 UTC
REVIEW: http://review.gluster.org/11604 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#1) for review on release-3.7 by Raghavendra Bhat (raghavendra)

Comment 3 Anand Avati 2015-07-13 09:16:50 UTC
REVIEW: http://review.gluster.org/11603 (features/bit-rot-stub: deny access to bad objects) posted (#2) for review on release-3.7 by Raghavendra Bhat (raghavendra)

Comment 4 Anand Avati 2015-07-15 04:46:04 UTC
COMMIT: http://review.gluster.org/11603 committed in release-3.7 by Venky Shankar (vshankar) 
------
commit 5144d3d5a4982a86f46ef023d0dc836d0fdead58
Author: Raghavendra Bhat <raghavendra>
Date:   Tue May 26 19:22:14 2015 +0530

    features/bit-rot-stub: deny access to bad objects
    
                           Backport of http://review.gluster.org/11126
    
    * 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: I6903184ab64a9d1ea595330b603935979c33bc26
    BUG: 1241529
    Reviewed-on: http://review.gluster.org/11603
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Venky Shankar <vshankar>

Comment 5 Anand Avati 2015-07-15 06:44:16 UTC
COMMIT: http://review.gluster.org/11604 committed in release-3.7 by Venky Shankar (vshankar) 
------
commit 94b0109a8ed55d5aebe0604ffb19cbb583797cf5
Author: Raghavendra Bhat <raghavendra>
Date:   Wed Jun 24 20:06:01 2015 +0530

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

Comment 6 Kaushal 2015-07-30 09:48:34 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.7.3, please open a new bug report.

glusterfs-3.7.3 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12078
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Kaushal 2015-07-30 09:48:43 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.7.3, please open a new bug report.

glusterfs-3.7.3 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12078
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Brad Hubbard 2015-12-23 01:17:13 UTC
Reopening since I see this on the latest nightly.

glusterfs-3.7.5-12.el6rhs.x86_64

# getfattr -d -e hex -m.  /rhgs/brick3/etc/prelink.cache
getfattr: Removing leading '/' from absolute path names
# file: rhgs/brick3/etc/prelink.cache
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a64656661756c745f743a733000
trusted.afr.dirty=0x000000000000000000000000
trusted.bit-rot.bad-file=0x3100
trusted.bit-rot.signature=0x01020000000000000084ff92691f909a05b224e1c56abb4864f01b4f8e3c854e4bb4c7baf1d3f6d652
trusted.bit-rot.version=0x02000000000000005678d5e20008117f
trusted.gfid=0x79e7925db5a548cdada2e7f9817c4f12

# head -1 /mnt/glustermounts/etc/prelink.cache
prelink-ELF0.3.2�'/�
V,�                 ��xV�ĨU�V
   �xV�N:�Vٹ�SJ�1%�>B�xV�U@21◆2±�
&�T┐>B�│V��2�2���│VYӃ>B�│VV>C�│VR�� GߢS��
                                    �│V�N       �!>C�│V�▮#L�$>C�│V���U1�6�│V7VE�7_C�│V:KK2P� 2]�:>C�│V��)L⎽�@>C�│V�T��D
2��Q┌�│VJ3�UDŽR├�│VP¸UلS┘�│V�3BVTb�│VL�U��>C�│VP@2#◆2"�X>C�│V��↓�[>C�│V�L�°>C�│V°�S▒�┐>C�│V�U├�┼>C�│VV��─�│VٖCK��⎼�│VGߢSՅ⎽>C�│V↑┘┬�│Vė\U��│�│V3S

No EIO.

Comment 9 Niels de Vos 2016-05-10 12:47:33 UTC
Could you have a look at this and decide what to do with this bug?

Comment 10 RajeshReddy 2016-05-30 03:37:00 UTC
Hi Brad Hubbard,

In case of replica volume if all copies are bad then only EIO error comes,and any of the copy is good read/write will be served from that copy

In your case all copies are bad ?

Comment 11 Brad Hubbard 2016-05-30 03:52:35 UTC
(In reply to RajeshReddy from comment #10)
> Hi Brad Hubbard,
> 
> In case of replica volume if all copies are bad then only EIO error
> comes,and any of the copy is good read/write will be served from that copy
> 
> In your case all copies are bad ?

It was only by luck I saw this. If you need my input set NEEDINFO on me.

This was nearly six months ago and I don't remember the circumstances or details. This is te problem with requesting feedback 6 months later.

Comment 12 Kaushal 2017-03-08 10:54:34 UTC
This bug is getting closed because GlusteFS-3.7 has reached its end-of-life.

Note: This bug is being closed using a script. No verification has been performed to check if it still exists on newer releases of GlusterFS.
If this bug still exists in newer GlusterFS releases, please reopen this bug against the newer release.

Comment 13 Red Hat Bugzilla 2023-09-14 03:01:47 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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