From 180d27cc37d674b92c75b0cdc58b41e454a2cef3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 20 Sep 2021 19:46:05 +0200 Subject: [PATCH] outposts: don't restart container when health checks are starting Signed-off-by: Jens Langhammer --- authentik/outposts/controllers/docker.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/authentik/outposts/controllers/docker.py b/authentik/outposts/controllers/docker.py index 25784cb6d..51f3ce889 100644 --- a/authentik/outposts/controllers/docker.py +++ b/authentik/outposts/controllers/docker.py @@ -164,11 +164,9 @@ class DockerController(BaseController): self.down() return self.up(depth + 1) # Check that container is healthy - if ( - container.status == "running" - and container.attrs.get("State", {}).get("Health", {}).get("Status", "") - != "healthy" - ): + if container.status == "running" and container.attrs.get("State", {}).get( + "Health", {} + ).get("Status", "") not in ["healthy", "starting"]: # At this point we know the config is correct, but the container isn't healthy, # so we just restart it with the same config if has_been_created: