From f684f6d9071cc5da181b1beb2d7782a0aafbaf57 Mon Sep 17 00:00:00 2001 From: Xan Manning Date: Sat, 7 Mar 2020 16:15:41 +0000 Subject: [PATCH] A retry has been added to task controlling secondary master startup. Fixes #17 There appeared to be a race condition where starting all secondary masters all at once would cause the k3s service to fail on a number of the other masters. A retry has been added to the task to attempt to bring them all up until they stop failing. --- tasks/build/configure-k3s-cluster.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/build/configure-k3s-cluster.yml b/tasks/build/configure-k3s-cluster.yml index 6647e1d..3948806 100644 --- a/tasks/build/configure-k3s-cluster.yml +++ b/tasks/build/configure-k3s-cluster.yml @@ -53,6 +53,10 @@ name: k3s state: started enabled: true + register: ensure_secondary_masters_started + until: ensure_secondary_masters_started is succeeded + retries: "{{ play_hosts | length }}" + delay: 2 when: k3s_control_node and not k3s_primary_control_node - name: Wait for control plane to be ready to accept connections