summaryrefslogtreecommitdiffstats
path: root/tools/glusterfind/src/main.py
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2015-06-12 12:48:27 +0530
committerVijay Bellur <vbellur@redhat.com>2015-06-12 23:46:11 -0700
commit4b8e23e507204d6b40e40d7420759511a52af843 (patch)
tree1b3abff5580da647be56310517ee1444e87ec983 /tools/glusterfind/src/main.py
parentc8f920dcfd4c9467022516f3b9b0493a5e7314fb (diff)
tools/glusterfind: ignoring deleted files
OSError and IOError exceptions were being thrown if files were deleted after session was created and a subsequent glusterfind pre was attmepted. glusterfind now detects this scenario and safely ignores these changes to the file-system. We also avoid recording deleted file paths into database in the case where gfid to path resolution cannot be performed for deleted files. Also, we now turn on volume option to capture delete paths. Change-Id: Iaf3883463f5e64643497bd77229ad80a9b2d5da5 BUG: 1230783 Reviewed-on: http://review.gluster.org/#/c/11194/ Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/11199 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'tools/glusterfind/src/main.py')
-rw-r--r--tools/glusterfind/src/main.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index 850024be2fe..5d5058f761b 100644
--- a/tools/glusterfind/src/main.py
+++ b/tools/glusterfind/src/main.py
@@ -352,6 +352,13 @@ def mode_create(session_dir, args):
logger.info("Volume option set %s, changelog.changelog on"
% args.volume)
+ execute(["gluster", "volume", "set",
+ args.volume, "changelog.capture-del-path", "on"],
+ exit_msg="Failed to set volume option "
+ "changelog.capture-del-path on", logger=logger)
+ logger.info("Volume option set %s, changelog.capture-del-path on"
+ % args.volume)
+
# Add Rollover time to current time to make sure changelogs
# will be available if we use this time as start time
time_to_update = int(time.time()) + get_changelog_rollover_time(