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

Fix: Add default route on delegatedNIC interface #3109

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

Conversation

paulyufan2
Copy link
Contributor

@paulyufan2 paulyufan2 commented Nov 6, 2024

Reason for Change:

This PR is to fix one issue in swiftv2 Windows scenario:
When a pod is created, the default route is added on infra vnet:
root@swiftv2-pod-3:/# ip route
default via 10.244.2.1 dev eth0 metric 1
It leads to ping a VM IP in the same VNET that cannot work.

There are two issues::
1.CNS does not provide the default route to CNI;
2.CNI should only add the default route to secondary interface customer vnet; on Swiftv2 scenario, skipDefaultRoutes is set to true for infraNIC interface and false for a secondary interface; so if !info.skipDefaultRoutes, then add default route.

Add dummy default route and pass to CNI as a workaround;

After this fix after a pod creation is done, the route table shows:
root@swiftv2-pod-1:/# ip route
default via 10.241.0.1 dev eth1

10.241.0.0/16 dev eth1 proto kernel scope link src 10.241.0.55
10.244.0.0/16 dev eth0 proto kernel scope link src 10.244.1.103

Issue Fixed:

Requirements:

Notes:

@paulyufan2 paulyufan2 added the cns Related to CNS. label Nov 6, 2024
@paulyufan2 paulyufan2 requested a review from a team as a code owner November 6, 2024 19:25
@paulyufan2 paulyufan2 requested review from timraymond, kmurudi and tamilmani1989 and removed request for timraymond November 6, 2024 19:25
@paulyufan2
Copy link
Contributor Author

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@paulyufan2
Copy link
Contributor Author

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cns Related to CNS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants