From 21b8114c3e43cb38d50471fab2b025e793c5d006 Mon Sep 17 00:00:00 2001 From: suhaskumar munavalli Date: Fri, 21 Aug 2026 13:13:03 +0530 Subject: [PATCH] CNV-67257: Set physicalNetworkName on OVN localnet NADs created from the console The NAD form wrote the bridge mapping into CNI name and omitted physicalNetworkName, so multiple VLAN NADs on one mapping collided. Jira: https://issues.redhat.com/browse/CNV-67257 RFE: https://issues.redhat.com/browse/RFE-9664 Case: 04498484 Signed-off-by: suhaskumar munavalli Co-authored-by: Cursor --- locales/en/plugin__networking-console-plugin.json | 2 +- locales/es/plugin__networking-console-plugin.json | 2 +- locales/fr/plugin__networking-console-plugin.json | 2 +- locales/ja/plugin__networking-console-plugin.json | 2 +- locales/ko/plugin__networking-console-plugin.json | 2 +- locales/zh/plugin__networking-console-plugin.json | 2 +- src/utils/resources/nads/types/types.ts | 1 + .../OVNK8sSecondaryLocalnetParameters.tsx | 5 ++++- src/views/nads/form/utils/utils.ts | 4 ++-- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/locales/en/plugin__networking-console-plugin.json b/locales/en/plugin__networking-console-plugin.json index bb2ec90e..c40497da 100644 --- a/locales/en/plugin__networking-console-plugin.json +++ b/locales/en/plugin__networking-console-plugin.json @@ -74,7 +74,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.", "At least one port is required": "At least one port is required", "Backend health": "Backend health", - "Bridge mapping": "Bridge mapping", "Bridge name": "Bridge name", "Browse...": "Browse...", "CA certificate": "CA certificate", @@ -321,6 +320,7 @@ "Percent": "Percent", "Persistent": "Persistent", "Phase": "Phase", + "Physical network name": "Physical network name", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.", "Please <2>try again.": "Please <2>try again.", "Pod crash loop back-off": "Pod crash loop back-off", diff --git a/locales/es/plugin__networking-console-plugin.json b/locales/es/plugin__networking-console-plugin.json index e7056a3b..c9cec928 100644 --- a/locales/es/plugin__networking-console-plugin.json +++ b/locales/es/plugin__networking-console-plugin.json @@ -77,7 +77,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "En el momento de la creación, el espacio de nombre debe configurarse con la etiqueta <2>{{label}}. Vaya a<5> Espacios de nombre para crear un nuevo espacio de nombre.", "At least one port is required": "Se requiere al menos un puerto", "Backend health": "Estado del backend", - "Bridge mapping": "Mapeo de puentes", "Bridge name": "Nombre del puente", "Browse...": "Navegar...", "CA certificate": "Certificado de CA", @@ -324,6 +323,7 @@ "Percent": "Por ciento", "Persistent": "Persistente", "Phase": "Fase", + "Physical network name": "Nombre de la red física", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "Nombre de la red física. Se debe configurar una asignación de puentes en los nodos del clúster para asignar entre los nombres de redes físicas y los puentes Open vSwitch.", "Please <2>try again.": "<2>Inténtelo de nuevo.", "Pod crash loop back-off": "Retroceso del bucle de caída del pod", diff --git a/locales/fr/plugin__networking-console-plugin.json b/locales/fr/plugin__networking-console-plugin.json index 38218090..225cc1a1 100644 --- a/locales/fr/plugin__networking-console-plugin.json +++ b/locales/fr/plugin__networking-console-plugin.json @@ -77,7 +77,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "Lors de sa création, l'espace de noms doit être configuré avec<2>{{label}} étiquette. Aller à<5> Espaces de noms pour créer un nouvel espace de noms.", "At least one port is required": "Au moins un port est requis", "Backend health": "État de fonctionnement du backend", - "Bridge mapping": "Mappage de ponts", "Bridge name": "Nom du pont", "Browse...": "Parcourir...", "CA certificate": "Certificat d’autorité de certification", @@ -324,6 +323,7 @@ "Percent": "Pourcent", "Persistent": "Persistant", "Phase": "Phase", + "Physical network name": "Nom du réseau physique", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "Nom du réseau physique. Un mappage de ponts doit être configuré sur les nœuds du cluster pour mapper les noms de réseaux physiques et les ponts Open\u00a0vSwitch.", "Please <2>try again.": "Veuillez <2>réessayer.", "Pod crash loop back-off": "Interruption de la boucle d’incidents du pod", diff --git a/locales/ja/plugin__networking-console-plugin.json b/locales/ja/plugin__networking-console-plugin.json index 80026dc4..6b671893 100644 --- a/locales/ja/plugin__networking-console-plugin.json +++ b/locales/ja/plugin__networking-console-plugin.json @@ -74,7 +74,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "作成時に、namespace に <2>{{label}} ラベルを設定する必要があります。<5>Namespaces に移動して、新しい namespace を作成してください。", "At least one port is required": "少なくとも 1 つのポートが必要です", "Backend health": "バックエンドの健全性", - "Bridge mapping": "ブリッジマッピング", "Bridge name": "ブリッジ名", "Browse...": "参照...", "CA certificate": "CA 証明書", @@ -321,6 +320,7 @@ "Percent": "パーセント", "Persistent": "永続的", "Phase": "フェーズ", + "Physical network name": "物理ネットワーク名", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "物理ネットワーク名。物理ネットワーク名と Open vSwitch ブリッジの間をマッピングするには、クラスターノード上にブリッジマッピングを設定する必要があります。", "Please <2>try again.": "<2>再試行 してください。", "Pod crash loop back-off": "Pod クラッシュループのバックオフ", diff --git a/locales/ko/plugin__networking-console-plugin.json b/locales/ko/plugin__networking-console-plugin.json index 0d5a16d6..ce2e11e0 100644 --- a/locales/ko/plugin__networking-console-plugin.json +++ b/locales/ko/plugin__networking-console-plugin.json @@ -74,7 +74,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "생성 시 <2>{{label}} 라벨을 사용하여 네임스페이스를 구성해야 합니다. 새 네임스페이스를 생성하려면 <5>Namespaces 로 이동하십시오.", "At least one port is required": "하나 이상의 포트가 필요합니다.", "Backend health": "백엔드 상태", - "Bridge mapping": "브리지 매핑", "Bridge name": "브리지 이름", "Browse...": "찾아보기...", "CA certificate": "CA 인증서", @@ -321,6 +320,7 @@ "Percent": "백분율", "Persistent": "영구적", "Phase": "단계", + "Physical network name": "물리적 네트워크 이름", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "물리적 네트워크 이름. 브리지 매핑은 물리적 네트워크 이름과 Open vSwitch 브리지 간에 매핑하려면 클러스터 노드에 구성해야 합니다.", "Please <2>try again.": "<2>다시 시도하십시오", "Pod crash loop back-off": "Pod 크래시 루프 백오프", diff --git a/locales/zh/plugin__networking-console-plugin.json b/locales/zh/plugin__networking-console-plugin.json index e6bad3cf..e39353b2 100644 --- a/locales/zh/plugin__networking-console-plugin.json +++ b/locales/zh/plugin__networking-console-plugin.json @@ -74,7 +74,6 @@ "At creation time the namespace must be configured with <2>{{label}} label. Go to <5>Namespaces to create a new namespace.": "在创建时,命名空间必须配置带有 <2>{{label}} 标签。进入 <5>Namespaces 以创建一个新命名空间。", "At least one port is required": "至少需要一个端口", "Backend health": "后端健康状况", - "Bridge mapping": "网桥映射", "Bridge name": "网桥名称", "Browse...": "浏览...", "CA certificate": "CA 证书", @@ -321,6 +320,7 @@ "Percent": "百分比", "Persistent": "持久性", "Phase": "阶段", + "Physical network name": "物理网络名称", "Physical network name. A bridge mapping must be configured on cluster nodes to map between physical network names and Open vSwitch bridges.": "物理网络名称。必须在集群节点上配置网桥映射,以便在物理网络名称和 Open vSwitch 网桥之间进行映射。", "Please <2>try again.": "请<2>再次尝试。", "Pod crash loop back-off": "Pod 崩溃(crash loop back-off)", diff --git a/src/utils/resources/nads/types/types.ts b/src/utils/resources/nads/types/types.ts index 67725a66..a6eb9af3 100644 --- a/src/utils/resources/nads/types/types.ts +++ b/src/utils/resources/nads/types/types.ts @@ -28,6 +28,7 @@ export type NetworkAttachmentDefinitionConfig = { mtu?: number; name: string; netAttachDefName?: string; + physicalNetworkName?: string; plugins?: NetworkAttachmentDefinitionPlugin[]; preserveDefaultVlan?: boolean; role?: string; diff --git a/src/views/nads/form/components/NetworkTypeParameters/components/OVNK8sSecondaryLocalnetParameters/OVNK8sSecondaryLocalnetParameters.tsx b/src/views/nads/form/components/NetworkTypeParameters/components/OVNK8sSecondaryLocalnetParameters/OVNK8sSecondaryLocalnetParameters.tsx index 7c0fea38..4f0b1e82 100644 --- a/src/views/nads/form/components/NetworkTypeParameters/components/OVNK8sSecondaryLocalnetParameters/OVNK8sSecondaryLocalnetParameters.tsx +++ b/src/views/nads/form/components/NetworkTypeParameters/components/OVNK8sSecondaryLocalnetParameters/OVNK8sSecondaryLocalnetParameters.tsx @@ -37,8 +37,9 @@ const OVNK8sSecondaryLocalnetParameters: FC = () => { return ( <> { {...register(`${baseId}.bridgeMapping`, { required: true, })} + data-test="nads-ovn-physical-network-name" + id="nads-ovn-physical-network-name" /> diff --git a/src/views/nads/form/utils/utils.ts b/src/views/nads/form/utils/utils.ts index 1a99b24c..c710da8b 100644 --- a/src/views/nads/form/utils/utils.ts +++ b/src/views/nads/form/utils/utils.ts @@ -48,8 +48,8 @@ const buildConfig = ( cniVersion: '0.4.0', excludeSubnets: networkTypeData?.excludeSubnets ?? undefined, mtu: parseInt(networkTypeData?.mtu, 10) || DEFAULT_MTU, - name: networkTypeData?.bridgeMapping, netAttachDefName, + physicalNetworkName: networkTypeData?.bridgeMapping, subnets, topology: ovnK8sTopologyKeys.ovnK8sLocalnet, type: NetworkTypeKeys.ovnKubernetesNetworkType, @@ -106,7 +106,7 @@ export const fromNADObjToFormData = ( subnets: configParsed?.subnets, }, [NetworkTypeKeys.ovnKubernetesSecondaryLocalnet]: { - bridgeMapping: configParsed?.name, + bridgeMapping: configParsed?.physicalNetworkName || configParsed?.name, excludeSubnets: configParsed?.excludeSubnets, mtu: (configParsed?.mtu || DEFAULT_MTU)?.toString(), subnets: configParsed?.subnets,