Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh showtech dump file modify timestamp before cleanup call #3595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anamehra
Copy link
Contributor

@anamehra anamehra commented Nov 4, 2024

Signed-off-by: Anand Mehra [email protected]

Fixes: sonic-net/sonic-buildimage#20693

What I did

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.

How I did it

touch the tarfile after finishing the gzip to refresh modify timestamp.

How to verify it

run show techsupport

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@anamehra
Copy link
Contributor Author

anamehra commented Nov 4, 2024

Hi @abdosi , please review or add reviewers. Thanks

@anamehra
Copy link
Contributor Author

anamehra commented Nov 8, 2024

Hi @qiluo-msft , please help with this PR review. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show techsupport techcleanup fails to clean old files when usage is more than permitted
1 participant