[docker-wait-any] immediately start to wait#77
Closed
stepanblyschak wants to merge 2 commits intomasterfrom
Closed
[docker-wait-any] immediately start to wait#77stepanblyschak wants to merge 2 commits intomasterfrom
stepanblyschak wants to merge 2 commits intomasterfrom
Conversation
It could happen that a container has already crashed but docker-wait-any will wait forever till it starts. It should, however, immediately exit to make the serivce restart. Signed-off-by: Stepan Blyschak <[email protected]>
nazariig
reviewed
Aug 1, 2022
| while True: | ||
| while docker_client.inspect_container(container_name)['State']['Status'] != "running": | ||
| time.sleep(1) | ||
|
|
There was a problem hiding this comment.
@stepanblyschak suggest having a log here:
log.log_info("Waiting on container '{}'".format(container_name))
nazariig
approved these changes
Aug 1, 2022
Signed-off-by: Stepan Blyschak <[email protected]>
stepanblyschak
pushed a commit
that referenced
this pull request
Feb 13, 2023
[sonic-linkmgrd][202012] submodule updates 489cf3 Jing Zhang Wed May 18 09:59:02 2022 -0700 Avoid switching active when LinkState == Down (#77) a6c9713 Jing Zhang Tue May 24 11:03:54 2022 -0700 [202012] Add option to enable or disable default route related feature (#72) dbb607d Jing Zhang Thu May 12 08:19:20 2022 -0700 [ci]: uplift diff coverage threshold to 80% (#71) sign-off: Jing Zhang [email protected]
stepanblyschak
pushed a commit
that referenced
this pull request
May 20, 2025
…est HEAD automatically (sonic-net#1036) #### Why I did it src/sonic-platform-common ``` * 7aadc13 - (HEAD -> 202412, origin/202412) Merge pull request #77 from prgeor/amph-bp (10 hours ago) [Riff] * b1ab4e6 - Support for Custom Amphenol 800G Backplane catridge (sonic-net#555) (11 hours ago) [Prince George] ``` #### How I did it #### How to verify it #### Description for the changelog
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.
It could happen that a container has already crashed but docker-wait-any
will wait forever till it starts. It should, however, immediately exit
to make the serivce restart.
Signed-off-by: Stepan Blyschak [email protected]
Why I did it
It is observed in some circumstances that the auto-restart mechanism does not work. Specifically for
swss.service,orchagenthad crashed beforedocker-wait-anystarted inswss.sh. This leddocker-wait-anywait forever forswssto be in"Running"state and it results in:The check for
"Running"state is not needed because for cold boot case we dostart_peer_and_dependent_servicesand for warm boot case the loop will retry to wait for container if this container is doing warm boot:sonic-buildimage/files/image_config/misc/docker-wait-any
Line 56 in d01a91a
How I did it
Removed the check for
"Running".How to verify it
Kill swss before
docker-wait-anyis reached and verify auto restart will restart swss serivce.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)