From 9313c8e879fbdcb3c4c74ca80daea2c44fa76ca2 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 7 Sep 2022 15:17:10 -0700 Subject: [PATCH] Fix docker wait requires at least one argument In the graceful shutdown for mergers and executors if we skip the docker exec to stop the container we also need to skip the docker wait. The reason for this is docker wait exits with an error code if not provided with any arguments to wait for. Change-Id: Id09666ee23e1a9599d477b63a89559e4ab1d21bf --- playbooks/roles/zuul-executor/tasks/graceful.yaml | 1 + playbooks/roles/zuul-merger/tasks/graceful.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/playbooks/roles/zuul-executor/tasks/graceful.yaml b/playbooks/roles/zuul-executor/tasks/graceful.yaml index 71a6a4940f..997699169e 100644 --- a/playbooks/roles/zuul-executor/tasks/graceful.yaml +++ b/playbooks/roles/zuul-executor/tasks/graceful.yaml @@ -20,6 +20,7 @@ chdir: /etc/zuul-executor become: true become_user: root + when: executor_container_list.stdout_lines | length > 0 - name: Remove Zuul Executor containers shell: cmd: docker-compose down diff --git a/playbooks/roles/zuul-merger/tasks/graceful.yaml b/playbooks/roles/zuul-merger/tasks/graceful.yaml index 72f7d4d705..7c801088f1 100644 --- a/playbooks/roles/zuul-merger/tasks/graceful.yaml +++ b/playbooks/roles/zuul-merger/tasks/graceful.yaml @@ -20,6 +20,7 @@ chdir: /etc/zuul-merger become: true become_user: root + when: merger_container_list.stdout_lines | length > 0 - name: Down Zuul Merger containers shell: cmd: docker-compose down