[Bugs] [Bug 1580540] New: print the path of the corrupted object in scrub status

bugzilla at redhat.com bugzilla at redhat.com
Mon May 21 18:02:49 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1580540

            Bug ID: 1580540
           Summary: print the path of the corrupted object in scrub status
           Product: GlusterFS
           Version: 4.1
         Component: bitrot
          Assignee: bugs at gluster.org
          Reporter: rabhat at redhat.com
                CC: bugs at gluster.org
        Depends On: 1570962
      Docs Contact: bugs at gluster.org



+++ This bug was initially created as a clone of Bug #1570962 +++

Description of problem:

The glusterfs.gfidtopath getxattr should fail if performed on a file that was
created when storage.gfid2path option was turned off. 


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. turn off gfid2path option on a gluster volume

gluster volume set <volume name> storage.gfid2path off

2. Create a file in the volume for which gfid2path option is turned off above.

3. Turn on gfid2path option on the same volume

gluster volume set <volume name> storage.gfid2path on

Do a getxattr on the file that was created when gfid2path option was off, for
the extended attribute "glusterfs.gfidtopath"

getfattr -n glusterfs.gfidtopath <path to the file>


Actual results:
echo $? returns success

Expected results:
The getfattr command should fail saying such a attribute is not present

Additional info:


This bug is mainly for backporting the patch "https://review.gluster.org/19963"
from master to the release-4.1 branch. In the master branch the same bug (from
which this bug is cloned) was used for 

A) bringing in the entire infrastructure of printing the paths of the corrupted
   objects found by bit-rot detection
B) fixing the getfattr behavior for "glusterfs.gfidtopath" xattr for a file
   created when gfid2path option was off. 


But the current release-4.1 branch contains the patch for (A) only. And hence
using this bug as a clone of the master bug, but only for the submission of the
patch that addresses (B)






--- Additional comment from Worker Ant on 2018-04-23 17:02:28 EDT ---

REVIEW: https://review.gluster.org/19928 (features/bitrot: print the path of
the corrupted objects) posted (#1) for review on master by Raghavendra Bhat

--- Additional comment from Worker Ant on 2018-05-04 07:14:27 EDT ---

COMMIT: https://review.gluster.org/19928 committed in master by "Amar Tumballi"
<amarts at redhat.com> with a commit message- features/bitrot: print the path of
the corrupted objects

Currently "gluster volume bitrot <volume name> scrub status"
gives the list of the corrupted objects (files as of now).
But only the gfids of those corrupted objects are seen and
one has to do getfattr, find etc operations to get the actual
path of those objects for removal etc.

This change makes an attempt to print the path of those files
as much as possible.

* Try to get the path using the on disk gfid2path xattr.

* If the above operation fails, then go for in memory path
(provided that the object has its dentry
properly created and linked in the inode table of the brick where
the corrupted object is present) So the gfid to path resolution is
a soft resolution, i.e. based on the inode and dentry cache in the
brick's memory. If the path cannot be obtained via inode table also,
then only gfid is printed.

Change-Id: Ie9a30307f43a49a2a9225821803c7d40d231de68
fixes: bz#1570962
Signed-off-by: Raghavendra Bhat <raghavendra at redhat.com>

--- Additional comment from Worker Ant on 2018-05-04 13:20:08 EDT ---

REVIEW: https://review.gluster.org/19963 (make posix return errors when
gfid2path key is absent) posted (#1) for review on master by Raghavendra Bhat

--- Additional comment from Worker Ant on 2018-05-18 00:20:06 EDT ---

COMMIT: https://review.gluster.org/19963 committed in master by "Amar Tumballi"
<amarts at redhat.com> with a commit message- make posix return errors when
gfid2path key is absent

Change-Id: I3a8d452d00560dac5e0b7ff0b1835d1f20a59f91
updates: bz#1570962
Signed-off-by: Raghavendra Bhat <raghavendra at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1570962
[Bug 1570962] print the path of the corrupted object in scrub status
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are the Docs Contact for the bug.


More information about the Bugs mailing list