[sonic_installer] Add swap setup support#1787
Merged
lolyu merged 7 commits intosonic-net:masterfrom Sep 3, 2021
Merged
Conversation
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
|
This pull request introduces 1 alert when merging d3cb7bf into 83309c6 - view on LGTM.com new alerts:
|
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
yxieca
reviewed
Aug 30, 2021
yxieca
reviewed
Aug 30, 2021
yxieca
reviewed
Aug 30, 2021
yxieca
reviewed
Aug 30, 2021
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Contributor
Author
|
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
14f82f9 to
92586e3
Compare
Contributor
Author
|
@yxieca, could you please take a review for my updates? Thanks! |
yxieca
approved these changes
Sep 2, 2021
Contributor
Author
|
Looks like this PR could not be cherry-picked to 202012, will create a separate PR for 202012 branch. |
Contributor
|
This commit could not be cleanly cherry-pick to 202012. Please submit another PR. |
lolyu
added a commit
that referenced
this pull request
Sep 13, 2021
What I did Port PR #1787 to 202012 branch
Contributor
|
This commit could not be cleanly cherry-pick to 202106. Please submit another PR. |
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.
What I did
sonic_installercommand so it could run on devices with limited memory resources.How I did it
sonic_installer:--skip-setup-swap: if present, will skip setup swap memory.--swap-mem-size: this will change the swap memory size(the default swap size is 1024 MiB)--total-mem-threshold: if the system total memory is less than the value passed to--total-mem-threshold(default 2048 MiB),sonic_installerwill setup swap memory.--available-mem-threshold: if the system available memory is less than the value passed to--available-mem-threshold(default 1200 MiB),sonic_installerwill setup swap memory.MutuallyExclusiveOptionto check the mutually-exclusive relationship between options.SWAPAllocatorto support swap memory setup/remove functionalities.sonic_installertries to setup swap, if the system disk free space is less than 4096 MiB,sonic_installerwill not setup swap memory.How to verify it
Run
sonic_installerover devices with limited memorysonic_installer install --helpoutput: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)