Skip to content

Adding fix to clear logs before reboot for disk out of space issue#20323

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
ravaliyel:ryeluri/Mellanox2700-fix-out-of-disk-space-issue
Sep 4, 2025
Merged

Adding fix to clear logs before reboot for disk out of space issue#20323
StormLiangMS merged 1 commit intosonic-net:masterfrom
ravaliyel:ryeluri/Mellanox2700-fix-out-of-disk-space-issue

Conversation

@ravaliyel
Copy link
Contributor

@ravaliyel ravaliyel commented Aug 19, 2025

Description of PR

Summary:
This PR adds a cleanup step to remove old log files from the /host/logs_before_reboot directory 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

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

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.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 19, 2025

CLA Signed

  • ✅login: ravaliyel / name: Ravali Yeluri (WIPRO LIMITED) / (ac17015)

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Ryangwaite
Copy link
Contributor

@StormLiangMS can you please help to merge this?

Copy link
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 852bb19 into sonic-net:master Sep 4, 2025
21 checks passed
@Ryangwaite
Copy link
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.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #20517

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants