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

egressgw: test for conflicting IP rules in ENI mode #27428

Merged

Conversation

julianwiedmann
Copy link
Member

When the DestCIDR of a policy changes, we first add the new IP rules before
deleting the old ones. But if the new DestCIDR is 0.0.0.0, attempting to
install the matching IP rules results in an -EEXIST error.

To deal with this, addMissingIpRulesAndRoutes() returns a shouldRetry
value. If it is set, we retry the installation after
removeUnusedIpRulesAndRoutes() has deleted the unused rules.

Add a test for this scenario.

@julianwiedmann julianwiedmann added release-note/ci This PR makes changes to the CI. feature/egress-gateway Impacts the egress IP gateway feature. labels Aug 10, 2023
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review August 10, 2023 14:36
@julianwiedmann julianwiedmann requested a review from a team as a code owner August 10, 2023 14:36
This has the advantage of translating a NULL destination in the rules to
0.0.0.0.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
When the DestCIDR of a policy changes, we first add the new IP rules before
deleting the old ones. But if the new DestCIDR is 0.0.0.0, attempting to
install the matching IP rules results in an -EEXIST error.

To deal with this, addMissingIpRulesAndRoutes() returns a `shouldRetry`
value. If it is set, we retry the installation after
removeUnusedIpRulesAndRoutes() has deleted the unused rules.

Add a test for this scenario.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann force-pushed the 1.15-egressgw-rules-conflict-test branch from 23c5ff1 to e94fd99 Compare September 1, 2023 05:40
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann
Copy link
Member Author

(no-change rebase to get CI healthy)

@julianwiedmann julianwiedmann merged commit 1e168bc into cilium:main Sep 1, 2023
60 checks passed
@julianwiedmann julianwiedmann deleted the 1.15-egressgw-rules-conflict-test branch September 1, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/egress-gateway Impacts the egress IP gateway feature. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants