Skip to content

Commit 0a92c06

Browse files
author
Roey Prat
committed
RED-33075 the tarball main directory should not have tar.gz in its name.
(cherry picked from commit 995f122)
1 parent 08d1ce4 commit 0a92c06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

log_collector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run(namespace, output_dir):
5858
collect_events(namespace, output_dir)
5959
collect_api_resources(namespace, output_dir)
6060
collect_pods_logs(namespace, output_dir)
61-
archive_files(output_dir)
61+
archive_files(output_dir, output_dir_name)
6262
logger.info("Finished Redis Enterprise log collector")
6363

6464

@@ -172,11 +172,11 @@ def collect_pods_logs(namespace, output_dir):
172172
logger.info(" + {}".format(pod))
173173

174174

175-
def archive_files(output_dir):
175+
def archive_files(output_dir, output_dir_name):
176176
file_name = output_dir + ".tar.gz"
177177

178178
with tarfile.open(file_name, "w|gz") as tar:
179-
tar.add(output_dir, arcname=file_name + ".tar.gz")
179+
tar.add(output_dir, arcname=output_dir_name)
180180
logger.info("Archived files into {}".format(file_name))
181181

182182
try:

0 commit comments

Comments
 (0)