From 8a72c8564c8dfbbe7ec5c778e5f6d0b72327b02e Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Tue, 1 Sep 2026 14:54:56 +0800 Subject: [PATCH] fix(ovn): delegate label migration to controller When an OVN deployment is limited to a compute host, run_once runs the label-migration lookup on that host. The controller kubeconfig is not available there, and suppressing the lookup error leads to a misleading resources attribute failure. Delegate the migration block to the first controller so it retains access to the cluster. Let lookup failures be reported directly. Signed-off-by: Yaguang Tang --- roles/ovn/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ovn/tasks/main.yml b/roles/ovn/tasks/main.yml index 0d23e16eb7..26c3a0ed2c 100644 --- a/roles/ovn/tasks/main.yml +++ b/roles/ovn/tasks/main.yml @@ -14,6 +14,7 @@ - name: Replace unnecessary label in ovn-controller daemonset run_once: true + delegate_to: "{{ groups['controllers'][0] }}" when: atmosphere_network_backend == 'ovn' block: - name: Check if ovn_controller DaemonSet exists @@ -24,7 +25,6 @@ name: ovn-controller kubeconfig: "{{ ovn_helm_kubeconfig }}" register: _ovn_controller_ds_info - failed_when: false - name: Delete existing ovn controller DaemonSet if type label is found kubernetes.core.k8s: