@@ -324,15 +324,14 @@ ovn_nohostsubnet_label=${OVN_NOHOSTSUBNET_LABEL:-""}
324324# should be set to true when dpu nodes are in the cluster
325325ovn_disable_requestedchassis=${OVN_DISABLE_REQUESTEDCHASSIS:- false}
326326
327- # external_ids:host-k8s-nodename is set on an Open_vSwitch enabled system if the ovnkube pod
328- # should function on behalf of a different host than external_ids:host
327+ # external_ids:host-k8s-nodename is set on an Open_vSwitch enabled system if the ovnkube stack
328+ # should function on behalf of a different host than external_ids:hostname. This includes
329+ # all the components that belond in an ovnkube stack (i.e. NB DB, SB DB, ovnkube etc)
329330# overwrite the K8S_NODE env var with the one found within the OVS metadata in this case
330- if [[ ${ovnkube_node_mode} == " dpu" ]]; then
331- K8S_NODE=$( ovs-vsctl --if-exists get Open_vSwitch . external_ids:host-k8s-nodename | tr -d ' \"' )
332- if [[ ${K8S_NODE} == " " ]]; then
333- echo " Trying to run in DPU mode and couldn't get the required Host K8s Nodename. Exiting..."
334- exit 1
335- fi
331+ ovn_k8s_node=$( ovs-vsctl --if-exists get Open_vSwitch . external_ids:host-k8s-nodename | tr -d ' \"' )
332+ if [[ ! -z $ovn_k8s_node ]]; then
333+ echo " host-k8s-nodename is set, overriding K8S_NODE with $ovn_k8s_node "
334+ K8S_NODE=$ovn_k8s_node
336335fi
337336
338337# Determine the ovn rundir.
@@ -2423,10 +2422,12 @@ ovn-node() {
24232422 wait_for_event ovs_ready
24242423 fi
24252424
2426- if [[ ${ovnkube_node_mode} != " dpu-host" ]] && [[ ${ovn_enable_interconnect} ! = " true" ]]; then
2425+ if [[ ${ovnkube_node_mode} == " dpu-host" ]] && [[ ${ovn_enable_interconnect} = = " true" ]]; then
24272426 # ready_to_start_node checks for the NB/SB readiness state.
24282427 # This is not available on the DPU host when interconnect is enabled,
24292428 # because the DBs will run locally on the DPU
2429+ echo " skipping ready_to_start_node on DPU Host and when interconnect is true"
2430+ else
24302431 echo " =============== ovn-node - (wait for ready_to_start_node)"
24312432 wait_for_event ready_to_start_node
24322433 fi
0 commit comments