Adding fix to clear logs before reboot for disk out of space issue#20323
Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom Sep 4, 2025
ravaliyel:ryeluri/Mellanox2700-fix-out-of-disk-space-issue
Merged
Adding fix to clear logs before reboot for disk out of space issue#20323StormLiangMS merged 1 commit intosonic-net:masterfrom ravaliyel:ryeluri/Mellanox2700-fix-out-of-disk-space-issue
StormLiangMS merged 1 commit intosonic-net:masterfrom
ravaliyel:ryeluri/Mellanox2700-fix-out-of-disk-space-issue
Conversation
The committers listed above are authorized under a signed CLA. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Ryangwaite
approved these changes
Aug 19, 2025
vaibhavhd
approved these changes
Aug 19, 2025
Contributor
|
@StormLiangMS can you please help to merge this? |
Contributor
|
@yejianquan can you please help with the 202505 cherry-pick? |
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Sep 4, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.
Collaborator
|
Cherry-pick PR to 202505: #20517 |
Merged
11 tasks
mssonicbld
pushed a commit
that referenced
this pull request
Sep 4, 2025
…20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.
xixuej
pushed a commit
to xixuej/sonic-mgmt
that referenced
this pull request
Sep 17, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.
vidyac86
pushed a commit
to vidyac86/sonic-mgmt
that referenced
this pull request
Oct 23, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: opcoder0 <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Jan 26, 2026
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Guy Shemesh <[email protected]>
lakshmi-nexthop
pushed a commit
to lakshmi-nexthop/sonic-mgmt
that referenced
this pull request
Jan 28, 2026
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Lakshmi Yarramaneni <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
…onic-net#20323) What is the motivation for this PR? To proactively prevent disk space issues by cleaning up unnecessary log files in /host/logs_before_reboot during the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern. How did you do it? Added the following line to the disk cleanup routine (typically found in the free_up_disk_space function): exec_command(module, "rm -rf /host/logs_before_reboot/*", ignore_error=True) This line is placed with other similar cleanup commands for logs, cores, dumps, etc. How did you verify/test it? Tested the updated cleanup routine in a testbed and verified that files in /host/logs_before_reboot are deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files. Any platform specific information? No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed. Supported testbed topology if it's a new test case? Not a new test case. This is a framework/testbed maintenance improvement. Documentation No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine. Signed-off-by: Yael Tzur <[email protected]>
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
Why I did it This is to add the HWSKU DCS-7060DX5-64S misc update. This is a must have for the platform support. This should get into the master branch as soon as possible and back port to the needed releases. Work item tracking Microsoft ADO (number only): How I did it Adding additional media, port config settings etc needed for the HWSKU. This is an updated version of an older PR sonic-net#19109 for 202305 which is closed. This PR should replace the older PR#19109 and should be cast to all active releases. This PR has the latest chip configuration base on Arista lab setting and the most up to date SI setting for optical transceivers. How to verify it We have verified it in house using the sonic mgmt test. In additional, we have verify all the SI value which match our HW database for optical deployment. This changes has been verified in Arista lab with 202305 , 202311, 202405 releases.
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
Why I did it This is to add the HWSKU DCS-7060DX5-64S misc update. This is a must have for the platform support. This should get into the master branch as soon as possible and back port to the needed releases. Work item tracking Microsoft ADO (number only): How I did it Adding additional media, port config settings etc needed for the HWSKU. This is an updated version of an older PR sonic-net#19109 for 202305 which is closed. This PR should replace the older PR#19109 and should be cast to all active releases. This PR has the latest chip configuration base on Arista lab setting and the most up to date SI setting for optical transceivers. How to verify it We have verified it in house using the sonic mgmt test. In additional, we have verify all the SI value which match our HW database for optical deployment. This changes has been verified in Arista lab with 202305 , 202311, 202405 releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
This PR adds a cleanup step to remove old log files from the
/host/logs_before_rebootdirectory as part of the disk space freeing routine. This helps ensure sufficient disk space before performing upgrade operations and keeps the testbed environment tidy.Fixes # (No specific issue number; general maintenance and disk space management improvement)
Type of change
Back port request
Approach
What is the motivation for this PR?
To proactively prevent disk space issues by cleaning up unnecessary log files in
/host/logs_before_rebootduring the disk space freeing step. This is especially useful before upgrades, where disk space can be a concern.How did you do it?
Added the following line to the disk cleanup routine (typically found in the
free_up_disk_spacefunction):This line is placed with other similar cleanup commands for logs, cores, dumps, etc.
How did you verify/test it?
Tested the updated cleanup routine in a testbed and verified that files in
/host/logs_before_rebootare deleted as expected. Confirmed that the upgrade process proceeds with sufficient disk space and no residual log files.Any platform specific information?
No platform-specific changes. This cleanup is safe for all platforms supported by SONiC testbed.
Supported testbed topology if it's a new test case?
Not a new test case. This is a framework/testbed maintenance improvement.
Documentation
No specific documentation updates are required for this change, as it is a maintenance step within the existing disk cleanup routine.