-
Notifications
You must be signed in to change notification settings - Fork 231
NO-ISSUE: Fix OVN multinode networking regression from removal of --sb-address flag #7362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a045671
47ce31f
1c30dd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,3 +34,11 @@ data: | |
| election-lease-duration=137 | ||
| election-renew-deadline=107 | ||
| election-retry-period=26 | ||
| {{- if .MultiNodeEnabled}} | ||
|
|
||
| [OvnNorth] | ||
| address=tcp:{{.NodeIP}}:{{.OVN_NB_PORT}} | ||
|
|
||
| [OvnSouth] | ||
| address=tcp:{{.NodeIP}}:{{.OVN_SB_PORT}} | ||
|
Comment on lines
+39
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Look for TLS/SSL configuration or firewall rules covering the OVN DB ports.
rg -n --glob '!deps/**' -C3 '9641|9642|OVN_NB_PORT|OVN_SB_PORT'
rg -n --glob '!deps/**' -C3 'pssl|ovn-nb-ssl|ovn-sb-ssl|firewall|firewalld'Repository: openshift/microshift Length of output: 50379 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- daemonset network and OVN connection context ---'
sed -n '145,180p;220,255p;295,325p;330,365p' assets/components/ovn/multi-node/master/daemonset.yaml
printf '%s\n' '--- OVN TLS and port-specific firewall references ---'
rg -n -i --glob '!vendor/**' --glob '!etcd/vendor/**' --glob '!deps/**' \
'pssl|ssl:|ovn.*cert|cert.*ovn|9641|9642' assets pkg docs test \
| grep -v -E 'histogram|requirements-ansible.lock' | head -200Repository: openshift/microshift Length of output: 4762 🤖 get_repo_knowledge executed:
Length of output: 5951 Security Misconfiguration Reachability: External Protect the OVN database ports. The multinode deployment configures unauthenticated 🧰 Tools🪛 YAMLlint (1.37.1)[error] 39-39: syntax error: could not find expected ':' (syntax) 🤖 Prompt for AI Agents |
||
| {{- end}} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -55,13 +55,49 @@ spec: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # K8S_NODE_IP triggers reconcilation of this daemon when node IP changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(date -Iseconds) - starting ovn-controller, Node: ${K8S_NODE} IP: ${K8S_NODE_IP}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Wait for the SBDB unix socket to appear. The sbdb container | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # removes stale sockets and creates fresh ones on startup. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Connecting to a stale socket would cause ovn-controller to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # cache a raft commit index higher than the fresh SBDB's. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Waiting for SBDB socket..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| while [ ! -S /run/ovn/ovnsb_db.sock ]; do sleep 1; done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "SBDB socket ready" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Wait for SBDB connectivity before starting ovn-controller. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Primary node: ovn-remote is unix:/var/run/ovn/ovnsb_db.sock and the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # socket is served by the sbdb container in ovnkube-master. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Worker node: ovnkube-node starts a socat relay that serves the local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # unix socket and forwards connections to the primary's TCP SBDB. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Avoid treating a stale unix socket (left from a previous run) as | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ready: for unix: remotes, verify the socket accepts connections. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Waiting for SBDB..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| until | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OVN_REMOTE=$(ovs-vsctl --timeout=5 get Open_vSwitch . external_ids:ovn-remote 2>/dev/null | tr -d '"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "${OVN_REMOTE}" =~ ^tcp: ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| true # TCP remote set by startup script — ready immediately | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [[ "${OVN_REMOTE}" =~ ^unix: ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Accept unix: only when something is actually listening on the socket | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| socat -t2 /dev/null "UNIX-CONNECT:${OVN_REMOTE#unix:}" 2>/dev/null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "SBDB ready (ovn-remote=${OVN_REMOTE})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # If a previous ovn-controller instance is still running (possible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # because it shares the host PID namespace), kill it so the new | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # invocation does not abort with "already running". Leave the pid | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # file in place so the concurrent ovnkube-node container can always | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # open it — ovn-controller will overwrite the file after the old | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # process has exited. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -f /var/run/ovn/ovn-controller.pid ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OLD_PID=$(cat /var/run/ovn/ovn-controller.pid) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if kill -0 "${OLD_PID}" 2>/dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Killing stale ovn-controller process ${OLD_PID}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kill "${OLD_PID}" 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Wait for the process to exit (up to 5 s) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for _ in $(seq 1 10); do | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kill -0 "${OLD_PID}" 2>/dev/null || break | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 0.5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+87
to
+98
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Validate the recorded PID before signaling it and stop startup if it survives the wait. The 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove stale .ctl sockets that belong to the dead process. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f /var/run/ovn/ovn-controller.*.ctl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exec ovn-controller unix:/var/run/openvswitch/db.sock -vfile:off \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --no-chdir --pidfile=/var/run/ovn/ovn-controller.pid \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -146,6 +182,66 @@ spec: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # the functionality depends on ip_forwarding being enabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The configmap's [OvnNorth]/[OvnSouth] address= fields point to the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # primary node's NB/SB TCP ports. They are used differently: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Primary node (SB_ADDR host == own IP): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The nbdb/sbdb containers in ovnkube-master serve local unix | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # sockets on this host. Only set encap OVS external_ids; do NOT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # touch the sockets or start relays. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Worker node (SB_ADDR host != own IP): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # No local nbdb/sbdb containers run. The ovnkube binary cannot | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # parse the address= fields (upstream config format mismatch) and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # falls back to the stale local unix sockets, blocking startup. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix: start socat relays that serve the local unix sockets and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # forward connections to the primary's TCP ports; also set | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ovn-remote in OVS so ovn-controller uses TCP directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NB_ADDR=$(awk 'BEGIN{f=0} /^\[OvnNorth\]/{f=1} f && /^address=/{print substr($0,9); exit}' \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /run/ovnkube-config/ovnkube.conf 2>/dev/null) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SB_ADDR=$(awk 'BEGIN{f=0} /^\[OvnSouth\]/{f=1} f && /^address=/{print substr($0,9); exit}' \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /run/ovnkube-config/ovnkube.conf 2>/dev/null) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "${SB_ADDR}" =~ ^tcp: ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Always set encap type and IP so ovn-controller can register the chassis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ovs-vsctl --timeout=5 set Open_vSwitch . \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "external_ids:ovn-encap-type=geneve" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "external_ids:ovn-encap-ip=${K8S_NODE_IP}" || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Worker detection: SB address points to a DIFFERENT host than ours | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "${SB_ADDR}" != *"${K8S_NODE_IP}"* ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Compare the Extract the host from 🐛 Proposed fix- # Worker detection: SB address points to a DIFFERENT host than ours
- if [[ "${SB_ADDR}" != *"${K8S_NODE_IP}"* ]]; then
+ # Worker detection: SB address points to a DIFFERENT host than ours.
+ # Compare the host exactly; a substring test would match
+ # 10.0.0.1 inside 10.0.0.10.
+ SB_HOST="${SB_ADDR#tcp:}" # host:port, or [v6]:port
+ SB_HOST="${SB_HOST%:*}" # strip port
+ SB_HOST="${SB_HOST#[}" # strip IPv6 brackets
+ SB_HOST="${SB_HOST%]}"
+ if [[ "${SB_HOST}" != "${K8S_NODE_IP}" ]]; then🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(date -Iseconds) - worker node: setting up OVN socket relays to primary" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove stale socket files from any previous run. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Any socat processes from a prior container instance are | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # already gone — CRI-O kills them via the cgroup on stop. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f /run/ovn/ovnnb_db.sock /run/ovn/ovnsb_db.sock | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Start socat relays: local unix socket → primary TCP port. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # These background processes survive the exec and are killed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # when the container stops (cgroup boundary). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NB_HOST_PORT="${NB_ADDR#tcp:}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SB_HOST_PORT="${SB_ADDR#tcp:}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| socat UNIX-LISTEN:/run/ovn/ovnnb_db.sock,fork,reuseaddr \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TCP:${NB_HOST_PORT} & | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| socat UNIX-LISTEN:/run/ovn/ovnsb_db.sock,fork,reuseaddr \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TCP:${SB_HOST_PORT} & | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(date -Iseconds) - NB relay → ${NB_HOST_PORT}, SB relay → ${SB_HOST_PORT}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Set ovn-remote so ovn-controller reaches the primary SBDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # over TCP directly (the socat relay also works, but TCP is simpler) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ovs-vsctl --timeout=5 set Open_vSwitch . \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "external_ids:ovn-remote=${SB_ADDR}" || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Export OVN_SB_DB/OVN_NB_DB so that ovn-sbctl/ovn-nbctl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # subprocess calls inside the ovnkube binary also use TCP. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export OVN_SB_DB="${SB_ADDR}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export OVN_NB_DB="${NB_ADDR}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(date -Iseconds) - setting ovn-remote=${SB_ADDR} encap-ip=${K8S_NODE_IP}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(date -Iseconds) - primary node: setting encap-ip=${K8S_NODE_IP}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "I$(date "+%m%d %H:%M:%S.%N") - ovnkube-node - start ovnkube --init-node ${K8S_NODE}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exec /usr/bin/ovnkube \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --init-node "${K8S_NODE}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,9 @@ func (s *KubeletServer) configure(cfg *config.Config) { | |
| kubeletFlags.NodeLabels["node-role.kubernetes.io/worker"] = "" | ||
| kubeletFlags.NodeLabels["node.openshift.io/os_id"] = osID | ||
| kubeletFlags.NodeLabels["node.kubernetes.io/instance-type"] = "rhde" | ||
| if !cfg.BootstrapKubeConfigExists() { | ||
| kubeletFlags.NodeLabels["node.microshift.io/role"] = "primary" | ||
| } | ||
|
Comment on lines
+92
to
+94
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
# Look for control-plane-side application of the primary role label.
rg -n 'node\.microshift\.io/role' --glob '!deps/**'
# Look for any node-object patch/label logic in MicroShift.
ast-grep run --pattern 'Nodes().Patch($$$)' --lang go
rg -nP --glob '!deps/**' -C3 '\bNodes\(\)\.(Update|Patch|Apply)'Repository: openshift/microshift Length of output: 7342 🤖 get_repo_knowledge executed:
Length of output: 632 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- pkg/node/kubelet.go ---'
cat -n pkg/node/kubelet.go | sed -n '55,115p'
printf '%s\n' '--- c2cc annotation controller ---'
cat -n pkg/controllers/c2cc/annotation.go | sed -n '1,210p'
printf '%s\n' '--- OVN node selector ---'
cat -n assets/components/ovn/multi-node/master/daemonset.yaml | sed -n '460,485p'
printf '%s\n' '--- kubelet node registration and label handling ---'
rg -n -C4 'NodeLabels|node-labels|Register.*Node|Create.*Node|Update.*Node|NodeRegistration' vendor/k8s.io/kubernetes/cmd/kubelet vendor/k8s.io/kubernetes/pkg/kubelet 2>/dev/null | head -240Repository: openshift/microshift Length of output: 38430 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- kubelet registration path ---'
cat -n vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go | sed -n '89,150p'
printf '%s\n' '--- node construction and label assignment ---'
cat -n vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go | sed -n '350,418p'
printf '%s\n' '--- default-label reconciliation ---'
rg -n -C8 'func \(kl \*Kubelet\) updateDefaultLabels|func updateDefaultLabels' vendor/k8s.io/kubernetes/pkg/kubeletRepository: openshift/microshift Length of output: 7273 🏁 Script executed: #!/bin/bash
set -eu
cat -n vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go | sed -n '276,315p'Repository: openshift/microshift Length of output: 1485 Apply the primary role label to existing nodes during upgrade. When an upgrade retains the existing Node object, kubelet does not add 🤖 Prompt for AI Agents |
||
|
|
||
| kubeletConfig, err := loadConfigFile(filepath.Join(config.DataDir, "/resources/kubelet/config/config.yaml")) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: openshift/microshift
Length of output: 50376
🏁 Script executed:
Repository: openshift/microshift
Length of output: 50376
🏁 Script executed:
Repository: openshift/microshift
Length of output: 19430
🏁 Script executed:
Repository: openshift/microshift
Length of output: 10246
🌐 Web query:
OVN ovn-kubernetes config address=tcp IPv6 brackets OvnNorth OvnSouth💡 Result:
In OVN-Kubernetes, when specifying IPv6 addresses for database connections in configuration files (such as the address field within [ovnnorth] or [ovnsouth] sections), you must enclose the IPv6 address in square brackets [] to distinguish the address from the port number [1][2]. The standard format for the address field when using TCP or SSL is: address=tcp:[IPv6_address]:port or address=ssl:[IPv6_address]:port For example: address=tcp:[2001:db8::1]:6641 This bracket notation is a standard requirement for OVS/OVN connection strings to ensure the parser correctly identifies the IPv6 address, preventing confusion between the colons in the IPv6 address and the colon separating the address from the port [1][3]. Note that in modern deployments of ovn-kubernetes, components often connect to local OVN databases via Unix sockets, making these TCP/SSL connection addresses less common or unnecessary for local node-to-database communication [4]. When configuring broader IPv6 networking for clusters (such as pod or service CIDRs), you specify the address without brackets [5][6][7].
Citations:
Bracket the OVN addresses for IPv6.
cfg.Node.NodeIPis populated and validated for IPv6-only configurations, so an emptyNodeIPis rejected. However, the template renders IPv6 addresses without brackets. This creates an invalid OVN host-port value and an invalidsocatrelay target. FormatNodeIPas a bracketed host when it is IPv6 in both OVN address fields.🤖 Prompt for AI Agents