From e7523b21fcf27aabc4d129731a9ec1ebf813a31a Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Fri, 13 Dec 2024 17:21:51 +0100 Subject: [PATCH 1/4] debian_hypervisor: make ovs-vswitchd_override.conf a template Signed-off-by: Yoann Congal --- roles/debian_hypervisor/tasks/main.yml | 6 +++--- .../ovs-vswitchd_override.conf.j2} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename roles/debian_hypervisor/{files/ovs-vswitchd_override.conf => templates/ovs-vswitchd_override.conf.j2} (100%) diff --git a/roles/debian_hypervisor/tasks/main.yml b/roles/debian_hypervisor/tasks/main.yml index 88567ff01..5c1d2f202 100644 --- a/roles/debian_hypervisor/tasks/main.yml +++ b/roles/debian_hypervisor/tasks/main.yml @@ -202,9 +202,9 @@ owner: root group: root mode: 0755 -- name: Copy ovs-vswitchd.service drop-in - ansible.builtin.copy: - src: ovs-vswitchd_override.conf +- name: Create ovs-vswitchd.service drop-in + template: + src: ovs-vswitchd_override.conf.j2 dest: /etc/systemd/system/ovs-vswitchd.service.d/override.conf owner: root group: root diff --git a/roles/debian_hypervisor/files/ovs-vswitchd_override.conf b/roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 similarity index 100% rename from roles/debian_hypervisor/files/ovs-vswitchd_override.conf rename to roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 From 528e5610487fe6168c78c1ff05644e17fc29a419 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Fri, 13 Dec 2024 17:22:50 +0100 Subject: [PATCH 2/4] debian_hypervisor: synchronize team0_x port state with OVS On hypervisor shutdown, OVS is stopped a long time before the team0_x ports are shutdown as well. In the meantime: * The switching done by OVS is stopped * The corosync totem stops circulating and nodes are disconnected from the pacemake cluster which leads to resources being stopped. * After a while, RTSP detects this and change ports configuration to avoid the shutdown node and corosync/pacemaker start back with the left nodes. To avoid this, use systemd services to shutdown team0_x ports as soon as OVS is stopped to signal RTSP to change the configuration "instantly" and thus, avoid the corosync totem timeout. Signed-off-by: Yoann Congal --- .../debian_hypervisor/files/team0_x@.service | 20 +++++++++++++++++++ roles/debian_hypervisor/tasks/main.yml | 10 +++++++++- .../templates/ovs-vswitchd_override.conf.j2 | 4 ++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 roles/debian_hypervisor/files/team0_x@.service diff --git a/roles/debian_hypervisor/files/team0_x@.service b/roles/debian_hypervisor/files/team0_x@.service new file mode 100644 index 000000000..fb8fceed6 --- /dev/null +++ b/roles/debian_hypervisor/files/team0_x@.service @@ -0,0 +1,20 @@ +# Systemd unit wrapping around team0_* ports. +# This can be used to synchronize ports link state with the service that use +# them. + +[Unit] +After=network.target +DefaultDependencies=false +Conflicts=shutdown.target +Before=shutdown.target +StopWhenUnneeded=true + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=networkctl up %i +ExecStop=networkctl down %i + +[Install] +# empty: This unit must be activated via Wants/Requires of other units that need +# it diff --git a/roles/debian_hypervisor/tasks/main.yml b/roles/debian_hypervisor/tasks/main.yml index 5c1d2f202..4a3a499c1 100644 --- a/roles/debian_hypervisor/tasks/main.yml +++ b/roles/debian_hypervisor/tasks/main.yml @@ -210,9 +210,17 @@ group: root mode: 0644 register: ovsvswitchd +- name: Copy team0_x@.service file + ansible.builtin.copy: + src: team0_x@.service + dest: /etc/systemd/system/team0_x@.service + owner: root + group: root + mode: 0644 + register: team0_x_service - name: Restart ovs-vswitchd ansible.builtin.systemd: state: restarted daemon_reload: yes name: ovs-vswitchd - when: ovsvswitchd.changed + when: ovsvswitchd.changed or team0_x_service.changed diff --git a/roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 b/roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 index 11fdc19e3..bf480c5e0 100644 --- a/roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 +++ b/roles/debian_hypervisor/templates/ovs-vswitchd_override.conf.j2 @@ -1,2 +1,6 @@ [Service] Slice=ovs.slice + +[Unit] +Requires=team0_x@{{team0_0}}.service +Requires=team0_x@{{team0_1}}.service From 0216411780f072624a8c7e4a8e954258116c89c8 Mon Sep 17 00:00:00 2001 From: Yoann Congal Date: Fri, 13 Dec 2024 17:23:27 +0100 Subject: [PATCH 3/4] network_networkdwait/README.md add missing variables Signed-off-by: Yoann Congal --- roles/network_networkdwait/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/network_networkdwait/README.md b/roles/network_networkdwait/README.md index 6e5de176e..52b3bb8b1 100644 --- a/roles/network_networkdwait/README.md +++ b/roles/network_networkdwait/README.md @@ -8,7 +8,11 @@ no requirement. ## Role Variables -no variables. +- cluster_ip_addr +- cluster_protocol +- interfaces_to_wait_for +- team0_0 +- team0_1 ## Example Playbook From 8603abf844388398622368c0852dcb3b8483c602 Mon Sep 17 00:00:00 2001 From: Florent CARLI Date: Sun, 15 Dec 2024 21:48:15 +0100 Subject: [PATCH 4/4] bump cukinia-tests Signed-off-by: Florent CARLI --- roles/deploy_cukinia_tests/cukinia-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/deploy_cukinia_tests/cukinia-tests b/roles/deploy_cukinia_tests/cukinia-tests index ac714c47e..1bf9efdbc 160000 --- a/roles/deploy_cukinia_tests/cukinia-tests +++ b/roles/deploy_cukinia_tests/cukinia-tests @@ -1 +1 @@ -Subproject commit ac714c47eeb220b443dd8ffd2d2dad435bbc5352 +Subproject commit 1bf9efdbc18febcb9fd765c1b977573a03090795