Bug 1359017 - [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: 3.7.12
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
bugs@gluster.org
URL:
Whiteboard:
Depends On: 1342459 1355706
Blocks: 1359020
TreeView+ depends on / blocked
 
Reported: 2016-07-22 06:14 UTC by Kotresh HR
Modified: 2016-08-02 07:24 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.7.14
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1355706
: 1359020 (view as bug list)
Environment:
Last Closed: 2016-08-02 07:24:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kotresh HR 2016-07-22 06:14:18 UTC
+++ This bug was initially created as a clone of Bug #1355706 +++

+++ 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-22 06:15:25 UTC
REVIEW: http://review.gluster.org/14982 (feature/bitrot: Ignore files with sticky bit set) posted (#1) for review on release-3.7 by Kotresh HR (khiremat)

Comment 2 Vijay Bellur 2016-07-22 17:21:46 UTC
COMMIT: http://review.gluster.org/14982 committed in release-3.7 by Vijay Bellur (vbellur) 
------
commit d1ba174fb2c9f2df7dd04ad6e34eeeedbe11bbce
Author: Kotresh HR <khiremat>
Date:   Tue Jul 12 15:21:23 2016 +0530

    feature/bitrot: Ignore files with sticky bit set
    
    Backport of http://review.gluster.org/14903
    
    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: 1359017
    Signed-off-by: Kotresh HR <khiremat>
    (cherry picked from commit 8c47b19fc057f08c47444ef557503e610c707128)
    Reviewed-on: http://review.gluster.org/14982
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Kaushal 2016-08-02 07:24:47 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.14, please open a new bug report.

glusterfs-3.7.14 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] https://www.gluster.org/pipermail/gluster-devel/2016-August/050319.html
[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.