From 4ed1d2c63aefffa41de601567a5adc375d70fd46 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 5 Feb 2025 09:29:24 -0800 Subject: [PATCH] Fix keycloak container restart handler This handler used an incorrect path to the docker-compose file and failed with no such file or directory errors. Update the handler to use the correct path to the docker-compose file. I also add a note that the check to avoid restarts when we just restarted containers may not be working as we did restart at least the mariadb container which is how I discovered this issue. Change-Id: If004b72e3efc0d0d4665c6fd56e514a5cb6191c5 --- playbooks/roles/keycloak/handlers/restart_keycloak.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/keycloak/handlers/restart_keycloak.yaml b/playbooks/roles/keycloak/handlers/restart_keycloak.yaml index b2aebff4a2..9153840310 100644 --- a/playbooks/roles/keycloak/handlers/restart_keycloak.yaml +++ b/playbooks/roles/keycloak/handlers/restart_keycloak.yaml @@ -5,11 +5,13 @@ - name: keycloak restart containers if running # Also makes sure the containers weren't just restarted by an image update + # TODO(clarkb) the check that we weren't just restarted by an image update + # doesn't seem to work possibly due to our pin on the keycloak version. when: quarkus_pids.rc == 0 and "is up-to-date" in keycloak_dcup.stderr block: - name: down containers shell: - cmd: docker-compose -f /etc/keycloak-compose/docker-compose.yaml down + cmd: docker-compose -f /etc/keycloak-docker/docker-compose.yaml down - name: up containers shell: - cmd: docker-compose -f /etc/keycloak-compose/docker-compose.yaml up -d + cmd: docker-compose -f /etc/keycloak-docker/docker-compose.yaml up -d