Skip to content
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

Add hybird overlay pod IPs to the namespace address_set #4751

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pliurh
Copy link
Contributor

@pliurh pliurh commented Sep 30, 2024

What this PR does and why is it needed

The IPs of the pods that are on hybrid overlay nodes shall also be added to the namespace address_set. Also add SDN node subnet gateway IP to host-network namespace address_set.

Which issue(s) this PR fixes

Fixes https://issues.redhat.com//browse/OCPBUGS-42244, https://issues.redhat.com/browse/OCPBUGS-42605

Special notes for reviewers

How to verify it

  1. Create a hybrid overlay enabled cluster.
  2. Create pods on hybrid overlay nodes.
  3. check if the pod IPs are added to the namespace address_set.

Details to documentation updates

Description for the changelog

Does this PR introduce a user-facing change?


@pliurh pliurh requested a review from a team as a code owner September 30, 2024 09:27
@github-actions github-actions bot added the area/unit-testing Issues related to adding/updating unit tests label Sep 30, 2024
go-controller/pkg/ovn/ovn.go Outdated Show resolved Hide resolved
hostNetworkIPs, err := oc.getHostNamespaceAddressesForNode(node)
if err != nil {
klog.Errorf("Error parsing annotation for node %s: %v", node.Name, err)
// during SDN live migration, add the SDN node GW IP to the host network address set.
Copy link
Member

Choose a reason for hiding this comment

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

this change is very openshift-specific, not sure if it belongs upstream...

Copy link
Contributor Author

@pliurh pliurh Oct 16, 2024

Choose a reason for hiding this comment

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

Can we have d/s only patch in openshift repo? If yes, I can propose this PR to d/s. But this code might be also valid for windows nodes if they also use the first IP of the host subnet for cross node host-to-pod traffic.

During live SDN migration, host-to-pod traffic originating from
SDN nodes will use the first IP address of the hybrid overlay node
subnet. These IPs are being added to ensure proper functionality of
host network policies.

Signed-off-by: Peng Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/unit-testing Issues related to adding/updating unit tests
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants