sonic-buildimage
sonic-buildimage copied to clipboard
show techsupport techcleanup fails to clean old files when usage is more than permitted
Description
config auto-techsupport global provides settings to limit tech support dump occupancy on disk to maintain helthy disk space usage. techsupport_cleanup.py provides the functionality to cleanup the disk based in usage.
During the show techsupport, generate_dump calls techsupport_cleanup with current generated file. The techsupport_cleanup verifies the file path provided for file last modification timestamp and on success only proceeds to cleanup. It expects the file to be modified within last 20 secs. Sometimes when file is big, gzip takes more that 20 sec. Due to this, the last modify timestamp to current time stamp diff is greater than 20 and verify_recent_file_creation fails causing cleanup to fail.
https://github.com/sonic-net/sonic-utilities/blob/7cbcfda5e517e5c8a8cfe7140468774b107d6280/utilities_common/auto_techsupport_helper.py#L119
We have observed this issue more frequently on T2 chassis sonic-mgmt runs due to hug number of syslog file being generated causing hugh dump file.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Output of show version
:
(paste your output here)
Output of show techsupport
:
(paste your output here or download and attach the file here )