From 9df754d53ef4d1fdec4f135c15cb781a505bd400 Mon Sep 17 00:00:00 2001 From: shriya-deshmukh Date: Fri, 26 Aug 2022 10:32:30 +0530 Subject: [PATCH] CORTX-34050: support bundle: rgw log directory not present in server pod logs. (#875) Signed-off-by: Shriya Deshmukh --- py-utils/src/utils/support_framework/log_filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py-utils/src/utils/support_framework/log_filters.py b/py-utils/src/utils/support_framework/log_filters.py index a38c3d15d..1477cae9e 100644 --- a/py-utils/src/utils/support_framework/log_filters.py +++ b/py-utils/src/utils/support_framework/log_filters.py @@ -184,7 +184,8 @@ def limit_time(src_dir, dest_dir, duration, file_name_reg_ex, start_time, end_time = FilterLog._parse_duration(duration) for file in os.listdir(src_dir): op_file = os.path.join(dest_dir, 'tmp_' + file) - if file.startswith(file_name_reg_ex): + # TODO: Handle time based log collection for rotated files('.gz') files + if file.startswith(file_name_reg_ex) and not file.endswith('.gz'): in_file = os.path.join(src_dir, file) with open(in_file, 'r') as fd_in, open(op_file, 'a') as fd_out: line = fd_in.readline()