Image disk space reduction#10172
Merged
saiarcot895 merged 3 commits intosonic-net:masterfrom Mar 16, 2022
Merged
Conversation
a222a75 to
9989477
Compare
Only containers which appeared to have a significant pip cache size are included here. Signed-off-by: Saikrishna Arcot <[email protected]>
Signed-off-by: Saikrishna Arcot <[email protected]>
9989477 to
45071d7
Compare
cb651aa to
385c7fd
Compare
xumia
reviewed
Mar 14, 2022
…for just the root user Signed-off-by: Saikrishna Arcot <[email protected]>
385c7fd to
5d1fecf
Compare
xumia
approved these changes
Mar 15, 2022
yxieca
approved these changes
Mar 15, 2022
|
|
||
| # If logs are being stored in memory, then don't bother | ||
| # creating the log file just to have it deleted afterwards. | ||
| $logs_inram && exit 0 |
Contributor
There was a problem hiding this comment.
I've seen this syntax causing trouble when -x was used. Something related to newer version of sh treat unmatched condition as failure. It would be safer to use if statement.
I can see that this syntax was used at line 29 as well.
Not making this issue blocking.
Contributor
Author
There was a problem hiding this comment.
Yeah true, I was a bit surprised that it was working here, but for now, I matched the syntax on line 29.
Collaborator
|
This commit could not be cleanly cherry-picked to 202012. Please submit another PR. |
Contributor
|
@saiarcot895, commit could not be cleanly cherry-picked to 202111. Please submit another PR. |
saiarcot895
added a commit
to saiarcot895/sonic-buildimage
that referenced
this pull request
Mar 28, 2022
Reduce the disk space taken up during bootup and runtime. 1. Remove python package cache from the base image and from the containers. 2. During bootup, if logs are to be stored in memory, then don't create the `var-log.ext4` file just to delete it later during bootup. 3. For the partition containing `/host`, don't reserve any blocks for just the root user. This just makes sure all disk space is available for all users, if needed during upgrades (for example). * Remove pip2 and pip3 caches from some containers Only containers which appeared to have a significant pip cache size are included here. Signed-off-by: Saikrishna Arcot <[email protected]> * Don't create var-log.ext4 if we're storing logs in memory Signed-off-by: Saikrishna Arcot <[email protected]> * Run tune2fs on the device containing /host to not reserve any blocks for just the root user Signed-off-by: Saikrishna Arcot <[email protected]> (cherry picked from commit 5617b1a)
saiarcot895
added a commit
that referenced
this pull request
Mar 29, 2022
Reduce the disk space taken up during bootup and runtime. 1. Remove python package cache from the base image and from the containers. 2. During bootup, if logs are to be stored in memory, then don't create the `var-log.ext4` file just to delete it later during bootup. 3. For the partition containing `/host`, don't reserve any blocks for just the root user. This just makes sure all disk space is available for all users, if needed during upgrades (for example). * Remove pip2 and pip3 caches from some containers Only containers which appeared to have a significant pip cache size are included here. Signed-off-by: Saikrishna Arcot <[email protected]> * Don't create var-log.ext4 if we're storing logs in memory Signed-off-by: Saikrishna Arcot <[email protected]> * Run tune2fs on the device containing /host to not reserve any blocks for just the root user Signed-off-by: Saikrishna Arcot <[email protected]> (cherry picked from commit 5617b1a)
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.
Why I did it
Reduce the disk space taken up during bootup and runtime.
How I did it
var-log.ext4file just to delete it later during bootup./host, don't reserve any blocks for just the root user. This just makes sure all disk space is available for all users, if needed during upgrades (for example).How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)