change source ip address from 169.254.1.1 to hostIP#939
change source ip address from 169.254.1.1 to hostIP#939l1b0k merged 1 commit intoAliyunContainerService:mainfrom
Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: Host veth addresses removed without replacement
The generateHostSlaveCfg function no longer assigns IP addresses to the host-side veth interface. The hardcoded LinkIPNet (169.254.1.1/32) and LinkIPNetv6 (fe80::1/128) addresses were removed, but no replacement from cfg.HostIPSet was added. This breaks routing from veth1, which uses LinkIP as a gateway in its routes. The fix should assign addresses from cfg.HostIPSet similar to how generateSlaveLinkCfgForIPVlan does in the IPVlan driver, aligning with the PR's intent to use hostIP instead of the hardcoded addresses.
plugin/datapath/exclusive_eni_linux.go#L275-L306
terway/plugin/datapath/exclusive_eni_linux.go
Lines 275 to 306 in 39cc3c4
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: Host slave interface missing IP address configuration
The generateHostSlaveCfg function removed the address configuration for the host VETH interface but didn't add the replacement logic to configure addresses from cfg.HostIPSet. The function now only sets up routes while leaving the Addrs field empty in the nic.Conf struct, causing the host interface to not receive any IP addresses during setup. This breaks the intended functionality to assign host IP addresses to the slave interface.
plugin/datapath/exclusive_eni_linux.go#L275-L305
terway/plugin/datapath/exclusive_eni_linux.go
Lines 275 to 305 in 67e635f
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: Host VETH link missing IP address configuration
The generateHostSlaveCfg function removed address configuration from the host VETH link but didn't replace it with addresses from cfg.HostIPSet. The old code added hardcoded LinkIPNet addresses, and while the test was updated to expect addresses from cfg.HostIPSet, the implementation now doesn't add any addresses at all. The Addrs field in the returned nic.Conf is nil/empty, causing the test assertion to fail when it checks for IP addresses on the host VETH link.
plugin/datapath/exclusive_eni_linux.go#L275-L302
terway/plugin/datapath/exclusive_eni_linux.go
Lines 275 to 302 in 80e7ba1
cmd/terway-cli/cni_linux_test.go
Outdated
| "network_policy_provider": "ebpf", | ||
| "disable_host_peer": true, | ||
| "type": "terway" | ||
| }`)) |
There was a problem hiding this comment.
Bug: Test JSON format incompatible with storeRuntimeConfig
The Test_storeRuntimeConfig_with_both_plugins test was changed to use a flat JSON structure without a "plugins" array, but storeRuntimeConfig iterates over container.Path("plugins").Children(). The function will receive no plugins to process, causing the test assertions to fail. Additionally, the test expectations (iptables, veth) don't match the JSON values (ebpf, missing eniip_virtual_type).
There was a problem hiding this comment.
Bug: Missing IP address configuration on host veth interface
The generateHostSlaveCfg function no longer configures any IP addresses on the host veth interface. The Addrs field initialization and address append logic were removed, but nothing was added to configure addresses using cfg.HostIPSet instead. The test expects these addresses to be present on the interface, and without them, network connectivity to the host through this interface will fail.
plugin/datapath/exclusive_eni_linux.go#L275-L305
terway/plugin/datapath/exclusive_eni_linux.go
Lines 275 to 305 in b3fedab
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes. Additional details and impacted files@@ Coverage Diff @@
## main #939 +/- ##
==========================================
- Coverage 61.77% 61.76% -0.01%
==========================================
Files 131 131
Lines 16104 16096 -8
==========================================
- Hits 9948 9942 -6
+ Misses 4984 4982 -2
Partials 1172 1172
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Note
Stop assigning fixed link IPs to host veth; rely on auto/borrowed IPs and keep only container routes, updating tests accordingly.
plugin/datapath/exclusive_eni_linux.go):Addrsconfiguration (no moreLinkIPNet/LinkIPNetv6assignment) ingenerateHostSlaveCfg.plugin/datapath/exclusive_eni_linux_test.go):cfg.HostIPSet.Written by Cursor Bugbot for commit d202986. This will update automatically on new commits. Configure here.