- kube-ovn-cni 初次记录 chassis 到 node
ChassisLoc = "/etc/openvswitch/system-id.conf"
func initChassisAnno(cfg *daemon.Configuration) error {
chassisID, err := os.ReadFile(util.ChassisLoc)
/etc/openvswitch/system-id.conf
(.venv) root@empty:~# k exec -it -n kube-system kube-ovn-cni-kbkw6 -- bash
root@kube-ovn-control-plane:/kube-ovn# cat /etc/openvswitch/system-id.conf
d67d13b9-255b-477c-9237-8031b8475a37
root@kube-ovn-control-plane:/kube-ovn#
root@kube-ovn-control-plane:/kube-ovn#
root@kube-ovn-control-plane:/kube-ovn#
root@kube-ovn-control-plane:/kube-ovn#
exit
(.venv) root@empty:~# k get node kube-ovn-control-plane -o yaml | grep d67d13b9-255b-477c-9237-8031b8475a37
ovn.kubernetes.io/chassis: d67d13b9-255b-477c-9237-8031b8475a37
(.venv) root@empty:~#
(.venv) root@empty:~# k ko sbctl list Chassis | grep -C 5 d67d13b9-255b-477c-9237-8031b8475a37
_uuid : 0d0a5cf2-6465-4126-a38a-a07e3f8bd438
encaps : [7da3ecba-fd2e-45b1-9118-9b6123f7f93f]
external_ids : {}
hostname : kube-ovn-control-plane
name : "d67d13b9-255b-477c-9237-8031b8475a37"
nb_cfg : 0
other_config : {ct-no-masked-label="true", datapath-type=system, iface-types="bareudp,erspan,geneve,gre,gtpu,internal,ip6erspan,ip6gre,lisp,patch,stt,system,tap,vxlan", is-interconn="false", mac-binding-timestamp="true", ovn-bridge-mappings="", ovn-chassis-mac-mappings="", ovn-cms-options="", ovn-ct-lb-related="true", ovn-enable-lflow-cache="true", ovn-limit-lflow-cache="", ovn-memlimit-lflow-cache-kb="", ovn-monitor-all="false", ovn-trim-limit-lflow-cache="", ovn-trim-timeout-ms="", ovn-trim-wmark-perc-lflow-cache="", port-up-notif="true"}
transport_zones : []
vtep_logical_switches: []
- kube-ovn-controller 更新相关 tag
也就意味着,kube-ovn-controller 在更新 chassis 之前,需要先确认 ovn.kubernetes.io/chassis 已经更新好了,至少不应该为空。
如果有同名 node chassis,需要清理掉冲突(全部删除再出发重建也可以)