-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update setup-container.sh to save build time. #6541
Merged
yutongzhang-microsoft
merged 3 commits into
sonic-net:master
from
yutongzhang-microsoft:yutongzhang/setup-container
Oct 26, 2022
Merged
Update setup-container.sh to save build time. #6541
yutongzhang-microsoft
merged 3 commits into
sonic-net:master
from
yutongzhang-microsoft:yutongzhang/setup-container
Oct 26, 2022
Conversation
This file contains 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
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
yutongzhang-microsoft
force-pushed
the
yutongzhang/setup-container
branch
from
October 24, 2022 08:00
5e1975e
to
d257459
Compare
yutongzhang-microsoft
changed the title
[ignore] Update setup-container.sh to save build time.
Update setup-container.sh to save build time.
Oct 26, 2022
wangxin
previously approved these changes
Oct 26, 2022
yejianquan
previously approved these changes
Oct 26, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
yutongzhang-microsoft
dismissed stale reviews from yejianquan and wangxin
via
October 26, 2022 02:59
77ebda5
yejianquan
approved these changes
Oct 26, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6 tasks
yutongzhang-microsoft
added a commit
that referenced
this pull request
Oct 26, 2022
Description of PR In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. What is the motivation for this PR? In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. How did you do it? Skip check the key "FLEX_COUNTER_DELAY_STATUS" when checking the running config. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
yejianquan
pushed a commit
that referenced
this pull request
Oct 27, 2022
Description of PR In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. What is the motivation for this PR? In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. How did you do it? In step "User configuration", when getent passwd {{ USER_NAME }} returns True, first delete the user and use useradd to add the user. How did you verify/test it? Setup container with new script and run test cases. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
yejianquan
pushed a commit
that referenced
this pull request
Oct 27, 2022
Description of PR In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. What is the motivation for this PR? In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. How did you do it? In step "User configuration", when getent passwd {{ USER_NAME }} returns True, first delete the user and use useradd to add the user. How did you verify/test it? Setup container with new script and run test cases. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
yejianquan
pushed a commit
that referenced
this pull request
Oct 27, 2022
Description of PR In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. What is the motivation for this PR? In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. How did you do it? Skip check the key "FLEX_COUNTER_DELAY_STATUS" when checking the running config. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
yejianquan
pushed a commit
that referenced
this pull request
Oct 27, 2022
Description of PR In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. What is the motivation for this PR? In pr #6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. How did you do it? Skip check the key "FLEX_COUNTER_DELAY_STATUS" when checking the running config. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
allen-xf
pushed a commit
to allen-xf/sonic-mgmt
that referenced
this pull request
Oct 28, 2022
Description of PR In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. What is the motivation for this PR? In setup-container.sh, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [moby/moby#5419] of docker, and the whole script will cost about 20 minutes. Using useradd can work around this bug, but usermod can't. In this pr, we use useradd instead of usermod to work around this bug, and save the build time. Now, the whole script will take around 6 minutes. How did you do it? In step "User configuration", when getent passwd {{ USER_NAME }} returns True, first delete the user and use useradd to add the user. How did you verify/test it? Setup container with new script and run test cases. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
allen-xf
pushed a commit
to allen-xf/sonic-mgmt
that referenced
this pull request
Oct 28, 2022
…-net#6624) Description of PR In pr sonic-net#6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. What is the motivation for this PR? In pr sonic-net#6541 , it changed the logic of generating golden config.It will cause more reload during test running, and add test running time. Most reload is caused by the "FLEX_COUNTER_DELAY_STATUS" in "FLEX_COUNTER_TABLE". In this pr, we temporarily skip this key, and we fix the issue, we will add this check back. How did you do it? Skip check the key "FLEX_COUNTER_DELAY_STATUS" when checking the running config. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
In
setup-container.sh
, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [https://github.com/moby/moby/issues/5419] of docker, and the whole script will cost about 20 minutes. Usinguseradd
can work around this bug, butusermod
can't. In this pr, we useuseradd
instead ofusermod
to work around this bug, and save the build time. Now, the whole script will take around 6 minutes.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In
setup-container.sh
, when building the docker container, the step "User configuration" will hang around several minutes probability because of the bug [https://github.com/moby/moby/issues/5419] of docker, and the whole script will cost about 20 minutes. Usinguseradd
can work around this bug, butusermod
can't. In this pr, we useuseradd
instead ofusermod
to work around this bug, and save the build time. Now, the whole script will take around 6 minutes.How did you do it?
In step "User configuration", when
getent passwd {{ USER_NAME }}
returns True, first delete the user and useuseradd
to add the user.How did you verify/test it?
Setup container with new script and run test cases.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation