From a88adc41019e6b18d28609473f686c295c5b8d33 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 16 Jun 2022 08:23:17 -0700 Subject: [PATCH] Auto update nodepool launchers We previously auto updated nodepool builders but not launchers when new container images were present. This created confusion over what versions of nodepool opendev is running. Use the same behavior for both services now and auto restart them both. There is a small chance that we can pull in an update that breaks things so we run serially to avoid the most egregious instances of this scenario. Change-Id: Ifc3ca375553527f9a72e4bb1bdb617523a3f269e --- playbooks/roles/nodepool-launcher/defaults/main.yaml | 1 - playbooks/roles/nodepool-launcher/tasks/main.yaml | 1 - playbooks/service-nodepool.yaml | 5 ++++- playbooks/zuul/run-base.yaml | 1 - .../zuul/templates/group_vars/nodepool-launcher.yaml.j2 | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 playbooks/roles/nodepool-launcher/defaults/main.yaml delete mode 100644 playbooks/zuul/templates/group_vars/nodepool-launcher.yaml.j2 diff --git a/playbooks/roles/nodepool-launcher/defaults/main.yaml b/playbooks/roles/nodepool-launcher/defaults/main.yaml deleted file mode 100644 index bb2ef3adab..0000000000 --- a/playbooks/roles/nodepool-launcher/defaults/main.yaml +++ /dev/null @@ -1 +0,0 @@ -nodepool_launcher_start: false diff --git a/playbooks/roles/nodepool-launcher/tasks/main.yaml b/playbooks/roles/nodepool-launcher/tasks/main.yaml index 7f3bad1099..0de9326c31 100644 --- a/playbooks/roles/nodepool-launcher/tasks/main.yaml +++ b/playbooks/roles/nodepool-launcher/tasks/main.yaml @@ -50,7 +50,6 @@ - name: Start nodepool launcher include_tasks: start.yaml - when: nodepool_launcher_start | bool # We can prune here as it should leave the "latest" tagged images # as well as the currently running images. diff --git a/playbooks/service-nodepool.yaml b/playbooks/service-nodepool.yaml index 7c873387c0..81d09fd758 100644 --- a/playbooks/service-nodepool.yaml +++ b/playbooks/service-nodepool.yaml @@ -10,7 +10,10 @@ - hosts: nodepool-launcher:!disabled name: "Configure nodepool launchers" - strategy: free + # The nodepool-launcher role will restart launchers if new container + # images are available. Run serially to ensure we don't kill the entire + # cluster if something is terribly wrong. + serial: 1 roles: - iptables - install-docker diff --git a/playbooks/zuul/run-base.yaml b/playbooks/zuul/run-base.yaml index d0898c365f..41431bc010 100644 --- a/playbooks/zuul/run-base.yaml +++ b/playbooks/zuul/run-base.yaml @@ -63,7 +63,6 @@ - group_vars/letsencrypt.yaml - group_vars/meetpad.yaml - group_vars/jvb.yaml - - group_vars/nodepool-launcher.yaml - group_vars/refstack.yaml - group_vars/registry.yaml - group_vars/control-plane-clouds.yaml diff --git a/playbooks/zuul/templates/group_vars/nodepool-launcher.yaml.j2 b/playbooks/zuul/templates/group_vars/nodepool-launcher.yaml.j2 deleted file mode 100644 index 893b3b4c4c..0000000000 --- a/playbooks/zuul/templates/group_vars/nodepool-launcher.yaml.j2 +++ /dev/null @@ -1 +0,0 @@ -nodepool_launcher_start: true