Skip to content

Commit

Permalink
Revert "[docker-wait-any] immediately start to wait (sonic-net#11595)"
Browse files Browse the repository at this point in the history
This reverts commit a8b2a53.
  • Loading branch information
yejianquan committed Sep 30, 2022
1 parent 1798823 commit 2b41824
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions files/image_config/misc/docker-wait-any
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ g_dep_services = []


def wait_for_container(docker_client, container_name):
log.log_info("Waiting on container '{}'".format(container_name))

while True:
while docker_client.inspect_container(container_name)['State']['Status'] != "running":
time.sleep(1)

docker_client.wait(container_name)

log.log_info("No longer waiting on container '{}'".format(container_name))
Expand Down

0 comments on commit 2b41824

Please sign in to comment.