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

Serve NodePort services on secondary IP addresses #3328

Merged
merged 4 commits into from Apr 21, 2023

Conversation

zeeke
Copy link
Contributor

@zeeke zeeke commented Dec 20, 2022

This PR makes NodePort services reachable on every IP address of a node.
They cannot be set only during ovnkube-node startup because other addresses can arrive later. The typical scenario is when a virtual IP address moves from a dead node the another.

PR adds End2End tests to the control-plane suite to cover the main scenario.

@zeeke zeeke changed the title Serve NodePort services on secondary IP addresses [WIP] Serve NodePort services on secondary IP addresses Dec 21, 2022
@coveralls
Copy link

coveralls commented Jan 4, 2023

Coverage Status

Coverage: 52.832% (-0.04%) from 52.869% when pulling e437c6b on zeeke:ocpbugs-4485 into 9e21b3a on ovn-org:master.

@zeeke zeeke force-pushed the ocpbugs-4485 branch 2 times, most recently from 11516dc to a122155 Compare January 13, 2023 10:17
@tssurya tssurya self-requested a review January 13, 2023 14:16
@zeeke zeeke changed the title [WIP] Serve NodePort services on secondary IP addresses Serve NodePort services on secondary IP addresses Jan 19, 2023
@tssurya tssurya assigned tssurya and unassigned tssurya Jan 24, 2023
@zeeke
Copy link
Contributor Author

zeeke commented Mar 30, 2023

Waiting for

to rebase this PR

Asserting on `netexec` response to not containing errors
does not allow using retries, as the test would fail during
the first attempt.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@zeeke zeeke changed the title Serve NodePort services on secondary IP addresses [WIP] Serve NodePort services on secondary IP addresses Apr 7, 2023
@zeeke zeeke force-pushed the ocpbugs-4485 branch 9 times, most recently from 456b127 to 22581b8 Compare April 12, 2023 07:46
@zeeke
Copy link
Contributor Author

zeeke commented Apr 12, 2023

/retest-failed

@zeeke zeeke force-pushed the ocpbugs-4485 branch 4 times, most recently from e335f8d to 518fb41 Compare April 14, 2023 07:16
@zeeke
Copy link
Contributor Author

zeeke commented Apr 14, 2023

/retest-failed

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
When a node gets a new IP addresses, node loadbalancers
should be updated to serve NodePort services on the new
address.

Update node_tracker.go to track both `host-addresses` and
`l3-gateway-config` IP addresses, as they are used in different
ways for building load balancers.

Add End2End test to control-plane suite.

Update load balancer unit tests to include a multi address node.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@zeeke zeeke changed the title [WIP] Serve NodePort services on secondary IP addresses Serve NodePort services on secondary IP addresses Apr 14, 2023
@@ -36,6 +36,7 @@ type nodeInfo struct {
// the node's Name
name string
// The list of physical IPs reported by the gatewayconf annotation
// TODO: not used, remove
Copy link
Contributor

Choose a reason for hiding this comment

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

just remove this comment and rest is lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, thanks for noticing

For NodePort Services with ExternalTrafficPolicy = Local,
incoming connections shouldn't be DNATted to masqueradeIP.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@trozet trozet merged commit 7bc2e16 into ovn-org:master Apr 21, 2023
4 checks passed
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 28, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 28, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 29, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 29, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 29, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request Apr 29, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 9, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-us that referenced this pull request May 11, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
tssurya pushed a commit to tssurya/ovn-kubernetes-1 that referenced this pull request Jun 5, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org/ovn-kubernetes#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-ds that referenced this pull request Sep 7, 2023
TemplateLB variables for node IP addresses have to
support multiple IP noda address, hence the variables
are in the format of NODE_IPv4_0, NODE_IPv4_1, NODE_IPv4_2, ...
Struct `NodeIPsTemplates` manage the template variables
for multiple nodes that may have different number of IP addresses each.

Add unit and e2e tests on TemplateLBs with multiple IP addresses.

Refs: ovn-org/ovn-kubernetes#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-ds that referenced this pull request Sep 7, 2023
Refs: ovn-org/ovn-kubernetes#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
zeeke added a commit to zeeke/ovn-kubernetes-ds that referenced this pull request Sep 8, 2023
Refs: ovn-org/ovn-kubernetes#3328

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants