From 0d52f26a9d9ddeb25cf24567e47be44aabc7429b Mon Sep 17 00:00:00 2001 From: saltydk Date: Wed, 18 Dec 2024 03:51:55 +0100 Subject: [PATCH] docker: lower timeout when controller polls for docker version and allow a longer retry delay --- roles/docker/tasks/subtasks/controller.yml | 2 +- scripts/saltbox_docker_controller.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/docker/tasks/subtasks/controller.yml b/roles/docker/tasks/subtasks/controller.yml index d78ec80e46..d2a7ae20d5 100644 --- a/roles/docker/tasks/subtasks/controller.yml +++ b/roles/docker/tasks/subtasks/controller.yml @@ -80,7 +80,7 @@ status_code: 200 register: result retries: 12 - delay: 5 + delay: 10 - name: Controller | Block Docker Controller ansible.builtin.uri: diff --git a/scripts/saltbox_docker_controller.py b/scripts/saltbox_docker_controller.py index 11b6cdfdeb..c72c5a33b5 100644 --- a/scripts/saltbox_docker_controller.py +++ b/scripts/saltbox_docker_controller.py @@ -370,7 +370,7 @@ async def lifespan(app: FastAPI): for attempt in range(1, retry_attempts + 1): try: - client = docker.from_env() + client = docker.from_env(timeout=10) docker_version = client.version() logging.info(f"Using Docker version: {docker_version['Components'][0]['Version']}")