From 247fdec7aed48241b851c476126ee24c9c69382b Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 27 Oct 2022 01:23:45 +0200 Subject: [PATCH 1/3] fixme: hotfix for multi-master netmaker-server netmaker doesnt handle concurrent joins to different server-nodes well and will duplicate addresses --- netmaker/tasks/join-network.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/netmaker/tasks/join-network.yml b/netmaker/tasks/join-network.yml index 0cc5cb0..e2a7716 100644 --- a/netmaker/tasks/join-network.yml +++ b/netmaker/tasks/join-network.yml @@ -3,3 +3,4 @@ command: "netclient join -t {{ netclient.join_network_token }}" failed_when: command.rc != 0 register: command + throttle: 1 From f42bce9b6b548f340c9440de15549c8b58146bd2 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 2 Nov 2022 16:37:53 +0100 Subject: [PATCH 2/3] Add changed-detection --- netmaker/tasks/join-network.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/netmaker/tasks/join-network.yml b/netmaker/tasks/join-network.yml index e2a7716..b201dd3 100644 --- a/netmaker/tasks/join-network.yml +++ b/netmaker/tasks/join-network.yml @@ -2,5 +2,6 @@ when: "netclient.join_network_token is defined" command: "netclient join -t {{ netclient.join_network_token }}" failed_when: command.rc != 0 + changed_when: "'starting wireguard' in command.stdout" register: command throttle: 1 From d9cf3d2066303182f036c199c2a2fe57203871ae Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 2 Nov 2022 16:38:13 +0100 Subject: [PATCH 3/3] Re-gatherfacts at the end for other plays --- netmaker/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netmaker/tasks/main.yml b/netmaker/tasks/main.yml index 9b522e8..d88655d 100644 --- a/netmaker/tasks/main.yml +++ b/netmaker/tasks/main.yml @@ -3,3 +3,6 @@ - import_tasks: ./install.yml - import_tasks: ./join-network.yml + +- name: Gather facts to get changes + ansible.builtin.gather_facts: