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

e2e: Avoid setting wrong routes for host-local IPAM #812

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Dec 4, 2024

The IPAM configuration:

{
"type":"host-local",
"subnet":"10.10.10.0{"type":"host-local",
"subnet":"10.10.10.0/24",
"rangeStart":"10.10.10.171",
"rangeEnd":"10.10.10.181",
"routes":[{"dst":"0.0.0.0/0"}],
"gateway":"10.10.10.1"
}

Can lead to the following pod ip route configuration:

default via 10.10.10.1 dev net1
default via 10.128.0.1 dev eth0
10.10.10.0/24 dev net1 proto kernel scope link src 10.10.10.172
10.128.0.0/23 dev eth0 proto kernel scope link src 10.128.0.135
10.128.0.0/14 via 10.128.0.1 dev eth0

which causes connectivity issues.

Avoid setting default routes to unknown gateways.

Copy link

github-actions bot commented Dec 4, 2024

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

coveralls commented Dec 4, 2024

Pull Request Test Coverage Report for Build 12176930359

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 29 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.09%) to 47.08%

Files with Coverage Reduction New Missed Lines %
controllers/generic_network_controller.go 5 74.38%
controllers/helper.go 24 60.67%
Totals Coverage Status
Change from base Build 12046950769: -0.09%
Covered Lines: 7176
Relevant Lines: 15242

💛 - Coveralls

@zeeke zeeke force-pushed the us/fix-test-ip-routes branch from 5cfd6d9 to e5a91ea Compare December 4, 2024 17:06
The IPAM configuration:

```
{
"type":"host-local",
"subnet":"10.10.10.0{"type":"host-local",
"subnet":"10.10.10.0/24",
"rangeStart":"10.10.10.171",
"rangeEnd":"10.10.10.181",
"routes":[{"dst":"0.0.0.0/0"}],
"gateway":"10.10.10.1"
}
```

Can lead to the following pod `ip route` configuration:
```
default via 10.10.10.1 dev net1
default via 10.128.0.1 dev eth0
10.10.10.0/24 dev net1 proto kernel scope link src 10.10.10.172
10.128.0.0/23 dev eth0 proto kernel scope link src 10.128.0.135
10.128.0.0/14 via 10.128.0.1 dev eth0
```

which causes connectivity issues.

Avoid setting default routes to unknown gateways.

Signed-off-by: Andrea Panattoni <[email protected]>
@zeeke zeeke force-pushed the us/fix-test-ip-routes branch 2 times, most recently from 767beec to ae40080 Compare December 5, 2024 09:21
@zeeke zeeke force-pushed the us/fix-test-ip-routes branch from ae40080 to df2a973 Compare December 5, 2024 09:30
@zeeke zeeke requested review from SchSeba and ykulazhenkov December 5, 2024 10:56
Copy link
Collaborator

@ykulazhenkov ykulazhenkov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this

@zeeke zeeke merged commit 07a7f05 into k8snetworkplumbingwg:master Dec 5, 2024
13 of 14 checks passed
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.

3 participants