+++ This bug was initially created as a clone of Bug #1337444 +++ Description of problem: ======================== In scenarios where scrubber would take more time to finish scrubbing files, a 'scrub status' output when scrubbing is in progress, displays the previous run's information for 'last completed scrub time' and 'duration of last scrub'. This provides an incorrect view to the user, giving the impression that scrubbing has completed. We should ideally have the field 'State of scrub' set to 'In progress' and the above mentioned fields set to '-' . The other two fields (files scrubbed, files skipped) correctly show the present run's details. Version-Release number of selected component (if applicable): ============================================================= How reproducible: ================ Always Steps to Reproduce: ==================== 1. Have a 4node cluster, with a dist-rep volume and sharding enabled. Set the scrub frequency to 'hourly' 2. Create 100 1MB files and wait for the scrubber to finish its run. 3. View the scrub status output for the validity of the fields that it shows. 4. Create 5 4GB files and wait for the next run of scrubbing to start. 5. When the scrubbing is in progress (as seen from scrub.log), issue a 'gluster volume bitrot <volname> scrub status' Actual results: =============== Scrub status shows 4 fields with respect to every node. 2 fields are updated as per the current run, and 2 as per the previous run. Expected results: ================= Either all the 4 fields must reflect the current run, OR all 4 fields must reflect the previous run. Preferable would be to let the user know that scrubbing is in progress, and update the fields accordingly.
The two fields 'last completed scrub time' and 'duration of last scrub' is actually related to last scrub run as the name it self indicates. In order to avoid confusion, showing whether the scrub is actually is "In progress" or "Idle" will help.
REVIEW: http://review.gluster.org/14864 (feature/bitrot: Show whether scrub is in progress/idle) posted (#1) for review on master by Kotresh HR (khiremat)
REVIEW: http://review.gluster.org/14864 (feature/bitrot: Show whether scrub is in progress/idle) posted (#2) for review on master by Kotresh HR (khiremat)
COMMIT: http://review.gluster.org/14864 committed in master by Jeff Darcy (jdarcy) ------ commit f4757d256e3e00132ef204c01ed61f78f705ad6b Author: Kotresh HR <khiremat> Date: Mon Jul 4 17:25:57 2016 +0530 feature/bitrot: Show whether scrub is in progress/idle Bitrot scrub status shows whether the scrub is paused or active. It doesn't show whether the scrubber is actually scrubbing or waiting in the timer wheel for the next schedule. This patch shows this status with "In Progress" and "Idle" respectively. Change-Id: I995d8553d1ff166503ae1e7b46282fc3ba961f0b BUG: 1352871 Signed-off-by: Kotresh HR <khiremat> Reviewed-on: http://review.gluster.org/14864 Smoke: Gluster Build System <jenkins.org> NetBSD-regression: NetBSD Build System <jenkins.org> CentOS-regression: Gluster Build System <jenkins.org> Reviewed-by: Jeff Darcy <jdarcy>