-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add and improve the e2e use case of the NIC where the default route is located #2425
Conversation
debug log:
|
Expect(err).NotTo(HaveOccurred(), "failed to execute command, error is: %v ", err) | ||
Expect(string(executeCommandResult)).Should(ContainSubstring(common.NIC1), "Expected NIC %v mismatch", common.NIC1) | ||
|
||
// ip r get <IP in net1 subnet>, should flow out from net1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否还可以加个 ip r get <service_subnet>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## main #2425 +/- ##
=======================================
Coverage 80.97% 80.97%
=======================================
Files 49 49
Lines 5251 5251
=======================================
Hits 4252 4252
Misses 842 842
Partials 157 157
Flags with carried forward coverage won't be shown. Click here to find out more. |
dc36928
to
00dffd8
Compare
is this ready for merge ? |
it could add commit together to pr for CI |
bdb43b7
to
67728fe
Compare
5652af4
to
f24ed02
Compare
…s located Signed-off-by: ty-dc <[email protected]>
cmd/coordinator/cmd/utils.go
Outdated
if defaultInterfaceRoutes[idx].Family == netlink.FAMILY_V6 { | ||
zeroIPAddress = net.IPv6zero | ||
} | ||
if route.Dst != nil || !route.Dst.IP.Equal(zeroIPAddress) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !route.Dst.IP.Equal(zeroIPAddress) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
cmd/coordinator/cmd/utils.go
Outdated
if defaultInterfaceRoutes[idx].Family == netlink.FAMILY_V6 { | ||
zeroIPAddress = net.IPv6zero | ||
} | ||
if route.Dst != nil || !route.Dst.IP.Equal(zeroIPAddress) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !route.Dst.IP.Equal(zeroIPAddress) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: ty-dc <[email protected]>
@@ -179,6 +179,15 @@ setup_spiderpool: | |||
fi ; \ | |||
if [ "$(E2E_SPIDERPOOL_ENABLE_COORDINATOR)" == "true" ] ; then \ | |||
HELM_OPTION+=" --set coordinator.enabled=true " ; \ | |||
if [ "$(INSTALL_CILIUM)" == "true" ] ; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, restoring this part of the code after the #2434 merge will also help verify the problem.
What this PR does / why we need it:
The changes are as follows:
Add a new case. Without setting any annotations or PodDefaultRouteNIC (default situation), the default route should be on net1.
Change the existing use case, specify PodDefaultRouteNIC as eth0, and check that the default route should be on eth0
Which issue(s) this PR fixes:
make sure your commit is signed off
Signed-off-by: ty-dc [email protected]