Skip to content

add swap memory into return available memory in reduce_and_add_sonic_images#11188

Merged
wangxin merged 1 commit intosonic-net:masterfrom
lipxu:20240104_public_upgrade_image
Jan 4, 2024
Merged

add swap memory into return available memory in reduce_and_add_sonic_images#11188
wangxin merged 1 commit intosonic-net:masterfrom
lipxu:20240104_public_upgrade_image

Conversation

@lipxu
Copy link
Contributor

@lipxu lipxu commented Jan 4, 2024

Description of PR

Summary:
Fixes # (issue)
26322283

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

Below PR enhanced the upgrade sonic image, and would check memory and disk usage before installing the image.
But not calculate SWAP memory into the total available memory space.
#11151

How did you do it?

Add swap free memory into total available memory.

How did you verify/test it?

2024-01-04 07:13:09,640 DEBUG #47: *** cmd: free -m ***
2024-01-04 07:13:09,736 DEBUG #49: *** rc: 0, out: total used free shared buff/cache available
Mem: 1948 1359 86 27 502 419
Swap: 2047 586 1461
, err: ***
2024-01-04 07:13:09,736 DEBUG #43: Available memory 1880, no need to free up memory space

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Copy link
Contributor

@lizhijianrd lizhijianrd left a comment

Choose a reason for hiding this comment

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

LGTM

@wangxin wangxin merged commit 6cb4d5b into sonic-net:master Jan 4, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 4, 2024
What is the motivation for this PR?
Below PR enhanced the upgrade sonic image, and would check memory and disk usage before installing the image.
But not calculate SWAP memory into the total available memory space.
sonic-net#11151

How did you do it?
Add swap free memory into total available memory.

Signed-off-by: xuliping <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #11190

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 4, 2024
What is the motivation for this PR?
Below PR enhanced the upgrade sonic image, and would check memory and disk usage before installing the image.
But not calculate SWAP memory into the total available memory space.
sonic-net#11151

How did you do it?
Add swap free memory into total available memory.

Signed-off-by: xuliping <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #11191

mssonicbld pushed a commit that referenced this pull request Jan 4, 2024
What is the motivation for this PR?
Below PR enhanced the upgrade sonic image, and would check memory and disk usage before installing the image.
But not calculate SWAP memory into the total available memory space.
#11151

How did you do it?
Add swap free memory into total available memory.

Signed-off-by: xuliping <[email protected]>
mssonicbld pushed a commit that referenced this pull request Jan 22, 2024
What is the motivation for this PR?
Below PR enhanced the upgrade sonic image, and would check memory and disk usage before installing the image.
But not calculate SWAP memory into the total available memory space.
#11151

How did you do it?
Add swap free memory into total available memory.

Signed-off-by: xuliping <[email protected]>
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.

4 participants