Blob Blame History Raw
From c5f29109bf2d300f5074bd7ef76575a6c5f26409 Mon Sep 17 00:00:00 2001
From: Milind Changire <mchangir@redhat.com>
Date: Mon, 30 Jan 2017 12:09:15 +0530
Subject: [PATCH 278/285] tools/glusterfind: delete temporary folder

Problem:
Run specific temporary folder created under
/usr/var/lib/misc/glusterfsd/glusterfind/<session>/<volume>/
remains undeleted.

Solution:
Delete the temporary folder from all nodes.

mainline:
> BUG: 1413526
> Reviewed-on: https://review.gluster.org/16416
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit 355c1955039a39c820880be72fe77d4e74af0967)

Change-Id: I0edaf868aebb01b15c489434bbb26fe853351384
BUG: 1413513
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/96371
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 tools/glusterfind/src/main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index 0c993f5..d146354 100644
--- a/tools/glusterfind/src/main.py
+++ b/tools/glusterfind/src/main.py
@@ -578,7 +578,7 @@ def mode_query(session_dir, args):
     except (IOError, OSError):
         pass
 
-    run_cmd_nodes("cleanup", args)
+    run_cmd_nodes("cleanup", args, tmpfilename=gtmpfilename)
 
     sys.stdout.write("Generated output file %s\n" % args.outfile)
 
@@ -637,7 +637,7 @@ def mode_pre(session_dir, args):
     except (IOError, OSError):
         pass
 
-    run_cmd_nodes("cleanup", args)
+    run_cmd_nodes("cleanup", args, tmpfilename=gtmpfilename)
 
     with open(status_file_pre, "w", buffering=0) as f:
         f.write(str(endtime_to_update))
-- 
2.9.3