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

coordinator: rework GetDefaultRouteInterface to get pod's default route nic #3302

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

ty-dc
Copy link
Collaborator

@ty-dc ty-dc commented Mar 7, 2024

Thanks for contributing!

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #3296

Special notes for your reviewer:

In IPv6 mode, a non-existent network card is set through PodDefaultRouteNIC, but the Pod has an IPv6 default route, but a null value is returned, thus skipping the synchronization of the default route and making the Pod successfully created. However, the creation should fail at this time and prompt "net2 don't exist in pod"

…can be hijacked to the specified NIC.

Signed-off-by: tao.yang <tao.yang@daocloud.io>
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.18%. Comparing base (3f820f0) to head (11aafc7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3302      +/-   ##
==========================================
+ Coverage   81.12%   81.18%   +0.05%     
==========================================
  Files          50       50              
  Lines        5372     5372              
==========================================
+ Hits         4358     4361       +3     
+ Misses        856      854       -2     
+ Partials      158      157       -1     
Flag Coverage Δ
unittests 81.18% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@cyclinder cyclinder changed the title Modify the ipv6 mode to get the podDefaultRouteNIC so that the route can be hijacked to the specified NIC. coordinator: rework GetDefaultRouteInterface to get pod's default route nic Mar 7, 2024
@weizhoublue
Copy link
Collaborator

no cherry-pick ?

@ty-dc ty-dc added cherrypick-release-v0.8 Cherry-pick the PR to branch release-v0.8. cherrypick-release-v0.9 labels Mar 8, 2024
@weizhoublue weizhoublue merged commit 2db9778 into spidernet-io:main Mar 11, 2024
51 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 11, 2024
coordinator: rework GetDefaultRouteInterface to get pod's default route nic
Signed-off-by: robot <tao.yang@daocloud.io>
github-actions bot pushed a commit that referenced this pull request Mar 11, 2024
coordinator: rework GetDefaultRouteInterface to get pod's default route nic
Signed-off-by: robot <tao.yang@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In only-ipv6 mode, specify the PodDefaultRouteNIC NIC and obtain the default route NIC as empty.
3 participants