Bug 1355706 - [Bitrot]: Sticky bit files considered and skipped by the scrubber, instead of getting ignored.
Summary: [Bitrot]: Sticky bit files considered and skipped by the scrubber, instead of...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: bitrot
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
bugs@gluster.org
URL:
Whiteboard:
Depends On: 1342459
Blocks: 1359017 1359020
TreeView+ depends on / blocked
 
Reported: 2016-07-12 09:56 UTC by Kotresh HR
Modified: 2017-03-08 09:31 UTC (History)
3 users (show)

Fixed In Version: v3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1342459
: 1359017 (view as bug list)
Environment:
Last Closed: 2017-03-08 09:31:59 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kotresh HR 2016-07-12 09:56:36 UTC
+++ This bug was initially created as a clone of Bug #1342459 +++

Description of problem:
=======================
If we have sticky bit files present in a distribute replicate volume, then they get displayed as 'skipped' in the scrub status output. Considering that the actual file would have anyways gotten considered, the scrubber should ideally be ignoring all T files.


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


How reproducible:
================
Reporting the first occurrence.


Steps to Reproduce:
===================
1. Have a 4node cluster, with n*2 distribute replicate volume.
2. Create files from the mountpoint
3. Create a scenario such that sticky bit files are created (say, kill a brick process, and do creates)
4. Validate the scrub status output

Actual results:
================
Step4 shows a number>0 in the field 'Files skipped' in scrub status output.

Expected results:
==================
Step4 should not show any files as skipped, as there is no open FD while the scrubber is doing its run.


[[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# gluster v list
disp
distrep2
distrep3
gluster_shared_storage
mm
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# gluster v info distrep2
 
Volume Name: distrep2
Type: Distributed-Replicate
Volume ID: a40e89f0-02dd-4fa7-8687-afe0f092ae80
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.47.188:/brick/brick1/distrep2
Brick2: 10.70.46.215:/brick/brick1/distrep2
Brick3: 10.70.46.187:/brick/brick1/distrep2
Brick4: 10.70.46.193:/brick/brick1/distrep2
Options Reconfigured:
cluster.self-heal-daemon: enable
performance.readdir-ahead: on
features.bitrot: on
features.scrub: Active
features.scrub-freq: hourly
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# gluster v bitrot distrep2 scrub status

Volume name : distrep2

State of scrub: Active

Scrub impact: lazy

Scrub frequency: hourly

Bitrot error log location: /var/log/glusterfs/bitd.log

Scrubber error log location: /var/log/glusterfs/scrub.log


=========================================================

Node: localhost

Number of Scrubbed files: 9

Number of Skipped files: 1

Last completed scrub time: 2016-06-03 10:21:46

Duration of last scrub (D:M:H:M:S): 0:0:0:43

Error count: 0


=========================================================

Node: 10.70.46.193

Number of Scrubbed files: 9

Number of Skipped files: 1

Last completed scrub time: 2016-06-03 10:21:45

Duration of last scrub (D:M:H:M:S): 0:0:0:42

Error count: 0


=========================================================

Node: dhcp47-188.lab.eng.blr.redhat.com

Number of Scrubbed files: 13

Number of Skipped files: 0

Last completed scrub time: 2016-06-03 10:21:50

Duration of last scrub (D:M:H:M:S): 0:0:0:46

Error count: 0


=========================================================

Node: 10.70.46.215

Number of Scrubbed files: 13

Number of Skipped files: 0

Last completed scrub time: 2016-06-03 10:21:49

Duration of last scrub (D:M:H:M:S): 0:0:0:46

Error count: 0

=========================================================

[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# 
[root@dhcp46-187 ~]# cd /brick/brick1/distrep2/dir1/dir2/dir3/dir4/dir5/
[root@dhcp46-187 dir5]# ls -l
total 32
---------T. 2 root root 20 Jun  3 11:59 file1_ln
-rw-r--r--. 2 root root 22 Jun  3 11:25 test1
-rw-r--r--. 2 root root 22 Jun  3 11:25 test2
-rw-r--r--. 2 root root 22 Jun  3 11:25 test4
[root@dhcp46-187 dir5]# 
[root@dhcp46-187 dir5]#

Comment 1 Vijay Bellur 2016-07-12 10:02:01 UTC
REVIEW: http://review.gluster.org/14903 (feature/bitrot: Ignore files with sticky bit set) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 2 Vijay Bellur 2016-07-14 06:07:43 UTC
REVIEW: http://review.gluster.org/14903 (feature/bitrot: Ignore files with sticky bit set) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 3 Vijay Bellur 2016-07-19 09:01:20 UTC
REVIEW: http://review.gluster.org/14903 (feature/bitrot: Ignore files with sticky bit set) posted (#3) for review on master by Kotresh HR (khiremat)

Comment 4 Vijay Bellur 2016-07-19 17:36:20 UTC
REVIEW: http://review.gluster.org/14903 (feature/bitrot: Ignore files with sticky bit set) posted (#4) for review on master by Kotresh HR (khiremat)

Comment 5 Vijay Bellur 2016-07-21 13:56:41 UTC
REVIEW: http://review.gluster.org/14903 (feature/bitrot: Ignore files with sticky bit set) posted (#5) for review on master by Jeff Darcy (jdarcy)

Comment 6 Vijay Bellur 2016-07-21 13:59:53 UTC
COMMIT: http://review.gluster.org/14903 committed in master by Jeff Darcy (jdarcy) 
------
commit 8c47b19fc057f08c47444ef557503e610c707128
Author: Kotresh HR <khiremat>
Date:   Tue Jul 12 15:21:23 2016 +0530

    feature/bitrot: Ignore files with sticky bit set
    
    Scrubber scrubs entries in backend. It is scrubbing files with sticky
    bit as well. This might include linkfiles which should be skipped.  This
    patch adds the check to ignore linkfiles during scrub.
    
    Change-Id: Ic21367b37770d391326c55c659491a1e5a82335b
    BUG: 1355706
    Signed-off-by: Kotresh HR <khiremat>
    Reviewed-on: http://review.gluster.org/14903
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    CentOS-regression: NetBSD Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>


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