Skip to content

[WIP] OCPBUGS-43004: Allow default network pods to reach localnet on the same node#2467

Closed
ricky-rav wants to merge 2 commits intoopenshift:masterfrom
ricky-rav:OCPBUGS-43004_419
Closed

[WIP] OCPBUGS-43004: Allow default network pods to reach localnet on the same node#2467
ricky-rav wants to merge 2 commits intoopenshift:masterfrom
ricky-rav:OCPBUGS-43004_419

Conversation

@ricky-rav
Copy link
Contributor

@ricky-rav ricky-rav commented Feb 19, 2025

Add a flow at prio=101 to allow traffic from the OVN network to the host network to be handled normally by the bridge instead of forwarding it directly to the NIC (which would be done by the flow at prio=100). This allows pods in the default network to reach localnet pods on the same node.

Testing upstream changes ovn-kubernetes/ovn-kubernetes#5041

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 19, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2025
@openshift-ci-robot
Copy link
Contributor

@ricky-rav: This pull request references Jira Issue OCPBUGS-43004, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Add a flow at prio=101 to allow traffic from the OVN network to the host network to be handled normally by the bridge instead of forwarding it directly to the NIC (which would be done by the flow at prio=100). This allows pods in the default network to reach localnet pods on the same node.

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.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Feb 19, 2025
@openshift-ci openshift-ci bot requested review from jcaamano and trozet February 19, 2025 12:26
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ricky-rav
Once this PR has been reviewed and has the lgtm label, please assign danwinship for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@ricky-rav
Copy link
Contributor Author

/retest

3 similar comments
@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav ricky-rav force-pushed the OCPBUGS-43004_419 branch 3 times, most recently from 8bc6cb3 to f856d80 Compare February 25, 2025 23:05
@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav
Copy link
Contributor Author

ricky-rav commented Feb 26, 2025

The current changes don't work with local gateway mode because the in_port=patchPort doesn't match.
The traffic goes pod->mp0->breth0 and when it's on breth0 it's already SNAT'ed to the node IP.
Having in_port=LOCAL breaks the cluster, as well as removing in_port and adding nw_dst=$nodeIP.

@ricky-rav ricky-rav force-pushed the OCPBUGS-43004_419 branch 2 times, most recently from 1bf3c66 to adbe68e Compare February 28, 2025 19:06
@ricky-rav
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2025
Add a flow at prio=101 to allow traffic from the OVN network to the host network to be handled normally by the bridge instead of forwarding it directly to the NIC (which would be done by the flow at prio=100). This allows pods in the default network to reach localnet pods on the same node.

Add two extra flows for icmpv6 to allow neighbor solicitation and neighbor advertisement messages to pass.

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
(cherry picked from commit 56c35d76f77843c3a9d95c0b4520dad0b495fd97)
(cherry picked from commit bd488ed94ef5fed0c9fd53e8c9c38ae4c00edc35)
Add e2e tests where a server pod is connected to a secondary localnet and pods in the default network try to reach the server pod on its localnet interface. The localnet is plugged to breth0 and IPs on the localnet interface are drawn from the subnets of the node primary interface addresses.
Two cases to check:
- client and server pods are on different nodes (works with existing code)
- client and server pods are on the same node (works thanks to the previous commit with extra openflow rule at prio=101)

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
(cherry picked from commit 9827ae07a787623fce14d4466fdaa3af1bce82fe)
(cherry picked from commit d62054494bfef24e75d7a4b4abf34ba009469430)
@ricky-rav ricky-rav force-pushed the OCPBUGS-43004_419 branch from adbe68e to 8235f62 Compare March 6, 2025 09:48
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2025
@ricky-rav
Copy link
Contributor Author

/retest

2 similar comments
@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 10, 2025

@ricky-rav: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openshift-e2e-gcp-ovn-techpreview-upgrade 8235f62 link false /test openshift-e2e-gcp-ovn-techpreview-upgrade
ci/prow/security 8235f62 link false /test security
ci/prow/e2e-aws-ovn-edge-zones 8235f62 link true /test e2e-aws-ovn-edge-zones

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

@ricky-rav ricky-rav closed this May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants