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 8431d3a.
  • Loading branch information
yxieca committed Sep 28, 2022
1 parent a7d088c commit 81b1cd7
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 81b1cd7

Please sign in to comment.