From 37f5d3120b831614f6fe50fe158fdcc94c4ea5bc Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Fri, 16 May 2025 11:54:56 -0500 Subject: [PATCH 1/2] OPNET-681: Support migration from configure-ovs to NMState Even though configure-ovs uses in-memory profiles to ensure we are starting with a clean slate on each boot, the OVS database may still have leftover artifacts in it. This causes issues if you try to switch to using NMState to manage br-ex because the entries conflict with what NMState does. This patch simply adds a call to delete br-ex from the ovsdb if it exists when we apply an NMState configuration. --- templates/common/_base/files/nmstate-configuration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/common/_base/files/nmstate-configuration.yaml b/templates/common/_base/files/nmstate-configuration.yaml index 42518fe6bb..be3fbd95db 100644 --- a/templates/common/_base/files/nmstate-configuration.yaml +++ b/templates/common/_base/files/nmstate-configuration.yaml @@ -36,5 +36,8 @@ contents: exit 1 fi + # Handle the case where we're migrating from configure-ovs + ovs-vsctl --timeout=30 --if-exists del-br br-ex + cp "$src_path/$config_file" /etc/nmstate touch /etc/nmstate/openshift/applied From 12878e47877bc46b528abe81154b1ae596ff21b7 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Mon, 30 Jun 2025 12:04:48 -0500 Subject: [PATCH 2/2] OCPBUGS-57484: Handle migration from OpenShift SDN --- templates/common/_base/files/nmstate-configuration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/common/_base/files/nmstate-configuration.yaml b/templates/common/_base/files/nmstate-configuration.yaml index be3fbd95db..891c6fdffe 100644 --- a/templates/common/_base/files/nmstate-configuration.yaml +++ b/templates/common/_base/files/nmstate-configuration.yaml @@ -39,5 +39,8 @@ contents: # Handle the case where we're migrating from configure-ovs ovs-vsctl --timeout=30 --if-exists del-br br-ex + # Handle the case where we're migrating from OpenShift SDN + ovs-vsctl --timeout=30 --if-exists del-br br0 + cp "$src_path/$config_file" /etc/nmstate touch /etc/nmstate/openshift/applied