Skip to content

USHIFT-7267: fix conformance networking issues#7052

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
pacevedom:USHIFT-7267
Jul 15, 2026
Merged

USHIFT-7267: fix conformance networking issues#7052
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
pacevedom:USHIFT-7267

Conversation

@pacevedom

@pacevedom pacevedom commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved OVN database startup reliability by removing stale socket files before services launch.
    • Ensured OVN controllers wait until the database socket is ready before connecting.
    • Updated multinode database connection handling to use node-specific endpoints.
    • Simplified multinode configuration by removing obsolete control-plane settings.

The upstream OVN-K binary removed the --nb-address/--sb-address flags,
changing the connection model from TCP to unix sockets. With TCP, each
connection attempt was fresh and a missing SBDB caused a clean retry.
With unix sockets on a shared hostPath, the socket file persists between
container restarts. If ovn-controller connects to a leftover socket from
a previous SBDB instance, it caches a stale raft commit index. When the
new SBDB starts fresh, ovn-controller sees the lower index as "stale
data" and enters an infinite reconnect loop, blocking all pod networking.

Fix this with a two-part approach:
- SBDB/NBDB containers remove stale sockets before starting ovsdb-server,
  which then creates fresh ones.
- ovn-controller waits for the fresh SBDB socket to appear before
  connecting, ensuring it never grabs a leftover socket.

Applied to both single-node and multi-node DaemonSets.
The northd container used template-rendered OVN_NB_DB_LIST and
OVN_SB_DB_LIST with the node IP baked into the DaemonSet spec.
In multinode, each node rendered the DaemonSet with its own IP,
causing spec changes on every reconcile and triggering rolling
updates that restarted the SBDB — the root cause of the stale
data issue.

Replace the baked-in template variables with the runtime env var
K8S_NODE_IP, which is resolved per-pod from status.hostIP. This
makes the DaemonSet spec identical regardless of which node renders
it, eliminating spurious rolling updates.

Remove the now-unused Controlplane field from MultiNodeConfig and
the OVN_NB_DB_LIST/OVN_SB_DB_LIST render parameters.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 15, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown

@pacevedom: This pull request references USHIFT-7267 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

OVN multi-node database connectivity now uses per-node TCP endpoints, while database startup removes stale Unix sockets. OVN controllers wait for the southbound database socket before starting. The multinode configuration no longer stores a control-plane address.

Changes

OVN readiness and database connectivity

Layer / File(s) Summary
Database endpoint configuration
pkg/config/multinode.go, pkg/components/networking.go, assets/components/ovn/multi-node/master/daemonset.yaml
Multi-node rendering uses OVN ports and node IP-based northbound/southbound endpoints, while removing the Controlplane, OVN_NB_DB_LIST, and OVN_SB_DB_LIST fields.
Database socket cleanup
assets/components/ovn/single-node/master/daemonset.yaml, assets/components/ovn/multi-node/master/daemonset.yaml
Database containers remove existing northbound and southbound Unix socket files before startup.
Controller socket readiness
assets/components/ovn/single-node/node/daemonset.yaml, assets/components/ovn/multi-node/node/daemonset.yaml
Controller startup waits until the southbound database path exists as a socket before executing ovn-controller.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pmtk

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main goal of fixing OVN conformance networking issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes OVN manifests/config; no Ginkgo test titles (It/Describe/Context/When) were added or modified.
Test Structure And Quality ✅ Passed No Ginkgo/test files were changed; the diff only touches YAML and config, so this test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo test declarations were added; the diff only changes YAML manifests and non-test Go config/rendering code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes OVN manifests and config; no new Ginkgo e2e tests or test files were added, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The PR only changes OVN startup/socket handling and DB address rendering; it adds no affinity, spread, nodeSelector, or replica logic.
Ote Binary Stdout Contract ✅ Passed Only YAML manifests and non-entrypoint config/rendering code changed; no main/init/TestMain stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff only changes manifests and config, with no It()/Describe() specs.
No-Weak-Crypto ✅ Passed Touched OVN YAML and config code only; scans found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-comparison usage.
Container-Privileges ✅ Passed No privilege-related fields were added in the PR diff; existing hostNetwork/privileged settings were unchanged.
No-Sensitive-Data-In-Logs ✅ Passed Changed logs are generic socket-readiness messages; no passwords, tokens, PII, or new internal host/customer data are logged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=warning msg="The linter 'gomodguard' is deprecated (since v2.12.0) due to: new major version. Replaced by gomodguard_v2."
level=warning msg="Suggested new configuration:\nlinters:\n enable:\n - gomodguard_v2\n"
level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/apparentlymart/go-cidr@v1.1.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/go-systemd@v0.0.0-20190321100706-95778dfbb74e: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/google/go-cmp@v0.7.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/miekg/dns@v1.1.63: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/openshift/api@v0.0.0-20260618181827-d22a47a846dc: is

... [truncated 31032 characters] ...

elet: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/metrics: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/mount-utils: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/pod-security-admission: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-apiserver: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-cli-plugin: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-controller: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from copejon and jerpeter1 July 15, 2026 09:00
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
assets/components/ovn/single-node/node/daemonset.yaml (1)

63-63: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Prevent infinite hanging.

These while loops lack a timeout. If the socket fails to materialize, the containers will hang permanently without exiting, masking the failure and complicating remediation. Add a timeout or retry limit.

  • assets/components/ovn/single-node/node/daemonset.yaml#L63-L63: add a timeout to the socket wait loop.
  • assets/components/ovn/multi-node/node/daemonset.yaml#L63-L63: add a timeout to the socket wait loop.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/components/ovn/single-node/node/daemonset.yaml` at line 63, The socket
wait loops in the daemonsets can hang indefinitely when the OVN socket never
appears. Update the loop at
assets/components/ovn/single-node/node/daemonset.yaml:63-63 and the
corresponding loop at assets/components/ovn/multi-node/node/daemonset.yaml:63-63
to enforce a finite timeout or retry limit, exiting with failure when the limit
is reached.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/components/ovn/multi-node/master/daemonset.yaml`:
- Around line 71-72: Revert the manual edits in the OVN daemonset manifests at
assets/components/ovn/multi-node/master/daemonset.yaml lines 71-72,
assets/components/ovn/single-node/master/daemonset.yaml lines 136-137,
assets/components/ovn/single-node/node/daemonset.yaml lines 58-65, and
assets/components/ovn/multi-node/node/daemonset.yaml lines 58-65. Apply the
intended changes through the upstream patching or templating mechanism instead
of editing rebase-managed assets directly.

---

Nitpick comments:
In `@assets/components/ovn/single-node/node/daemonset.yaml`:
- Line 63: The socket wait loops in the daemonsets can hang indefinitely when
the OVN socket never appears. Update the loop at
assets/components/ovn/single-node/node/daemonset.yaml:63-63 and the
corresponding loop at assets/components/ovn/multi-node/node/daemonset.yaml:63-63
to enforce a finite timeout or retry limit, exiting with failure when the limit
is reached.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9a318813-d3f4-4795-bcb2-a3cad9b1e8ba

📥 Commits

Reviewing files that changed from the base of the PR and between d4dd1f2 and 5da8d99.

📒 Files selected for processing (6)
  • assets/components/ovn/multi-node/master/daemonset.yaml
  • assets/components/ovn/multi-node/node/daemonset.yaml
  • assets/components/ovn/single-node/master/daemonset.yaml
  • assets/components/ovn/single-node/node/daemonset.yaml
  • pkg/components/networking.go
  • pkg/config/multinode.go
💤 Files with no reviewable changes (1)
  • pkg/config/multinode.go

Comment on lines +71 to +72
--ovnnb-db "tcp:${K8S_NODE_IP}:{{.OVN_NB_PORT}}" \
--ovnsb-db "tcp:${K8S_NODE_IP}:{{.OVN_SB_PORT}}" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔴 Critical | ⚖️ Poor tradeoff

Do not manually edit asset manifests.

As per coding guidelines, upstream component manifests under assets/ are rebase-managed and must not be edited manually. Ensure changes are applied via the correct patching or templating mechanism upstream.

  • assets/components/ovn/multi-node/master/daemonset.yaml#L71-L72: revert or migrate this manual edit.
  • assets/components/ovn/single-node/master/daemonset.yaml#L136-L137: revert or migrate this manual edit.
  • assets/components/ovn/single-node/node/daemonset.yaml#L58-L65: revert or migrate this manual edit.
  • assets/components/ovn/multi-node/node/daemonset.yaml#L58-L65: revert or migrate this manual edit.
📍 Affects 4 files
  • assets/components/ovn/multi-node/master/daemonset.yaml#L71-L72 (this comment)
  • assets/components/ovn/single-node/master/daemonset.yaml#L136-L137
  • assets/components/ovn/single-node/node/daemonset.yaml#L58-L65
  • assets/components/ovn/multi-node/node/daemonset.yaml#L58-L65
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/components/ovn/multi-node/master/daemonset.yaml` around lines 71 - 72,
Revert the manual edits in the OVN daemonset manifests at
assets/components/ovn/multi-node/master/daemonset.yaml lines 71-72,
assets/components/ovn/single-node/master/daemonset.yaml lines 136-137,
assets/components/ovn/single-node/node/daemonset.yaml lines 58-65, and
assets/components/ovn/multi-node/node/daemonset.yaml lines 58-65. Apply the
intended changes through the upstream patching or templating mechanism instead
of editing rebase-managed assets directly.

Source: Coding guidelines

@eslutsky

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eslutsky, pacevedom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pacevedom

Copy link
Copy Markdown
Contributor Author

/retest

@pacevedom

Copy link
Copy Markdown
Contributor Author

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 15, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@pacevedom: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pacevedom

Copy link
Copy Markdown
Contributor Author

/override ci/prow/e2e-aws-tests-bootc-el9

Unrelated error.

@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@pacevedom: Overrode contexts on behalf of pacevedom: ci/prow/e2e-aws-tests-bootc-el9

Details

In response to this:

/override ci/prow/e2e-aws-tests-bootc-el9

Unrelated error.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot
openshift-merge-bot Bot merged commit fd1872b into openshift:main Jul 15, 2026
16 checks passed
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@pacevedom: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pacevedom

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@pacevedom: new pull request created: #7056

Details

In response to this:

/cherry-pick release-4.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants