From aa53f97c4d19d223e54b383d412c428880f9e555 Mon Sep 17 00:00:00 2001 From: Daniel Horak Date: Wed, 13 May 2026 14:51:30 +0200 Subject: [PATCH] fix packing logs in collect_pod_container_rpm_package Signed-off-by: Daniel Horak --- ocs_ci/ocs/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ocs_ci/ocs/utils.py b/ocs_ci/ocs/utils.py index 8e8818c90685..368513a1ec30 100644 --- a/ocs_ci/ocs/utils.py +++ b/ocs_ci/ocs/utils.py @@ -1987,9 +1987,11 @@ def collect_pod_container_rpm_package(dir_name): tarball_path = f"{package_log_dir_path}.tar.gz" try: with tarfile.open(tarball_path, "w:gz") as tar: - tar.add(log_dir_path, arcname=os.path.basename(log_dir_path)) + tar.add( + package_log_dir_path, arcname=os.path.basename(package_log_dir_path) + ) if config.REPORTING.get("delete_packed_mg_logs"): - shutil.rmtree(log_dir_path) + shutil.rmtree(package_log_dir_path) except Exception as err: log.error(f"Failed during packing files! Error: {err}")