Skip to content

[fix] Ignore ipv6 routes#368

Merged
Andrews2024 merged 2 commits intomainfrom
ignore-ipv6-routes
Apr 4, 2025
Merged

[fix] Ignore ipv6 routes#368
Andrews2024 merged 2 commits intomainfrom
ignore-ipv6-routes

Conversation

@Andrews2024
Copy link
Copy Markdown
Contributor

General:

Currently, route_controller will attempt to create routes for IPv6 pod CIDRs and will fail, which means it will retry indefinitely (see logs below). IPv6 routes don't need to be configured because of the huge address space available, so this PR updates CCM route_controller to effectively ignore IPv6 CIDRs. This is done by adding the route to a local cache of "configured" routes, then appending those routes to the list of configured routes returned by ListRoutes. This tells route_controller that the route has been configured, but no configuration has actually been made.

I0402 16:24:49.847301       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "10.192.2.0/24": "keep"
I0402 16:24:49.847305       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "fd00::/64": "add"
I0402 16:24:49.847316       1 route_controller.go:288] route spec to be created: &{ ccm-717a8f3-md-0-qzzm2-nx6vj false [{Hostname ccm-717a8f3-md-0-qzzm2-nx6vj} {InternalIP 10.0.0.4} {InternalIP 192.168.148.132} {ExternalIP 172.233.184.144} {ExternalIP 2a01:7e04::f03c:95ff:fe07:d941}] fd00::/64 false}
I0402 16:24:49.847411       1 route_controller.go:302] Creating route for node ccm-717a8f3-md-0-qzzm2-nx6vj fd00::/64 with hint b6231493-7793-408c-b7a6-cb9d4fe558f3, throttled 54.65µs
E0402 16:24:50.009509       1 route_controller.go:327] Could not create route b6231493-7793-408c-b7a6-cb9d4fe558f3 fd00::/64 for node ccm-717a8f3-md-0-qzzm2-nx6vj: [400] [ip_ranges[1]] Only IPv4 ranges are allowed
I0402 16:24:50.009615       1 route_controller.go:376] set node ccm-717a8f3-control-plane-nstww with NodeNetworkUnavailable=false was canceled because it is already set
I0402 16:24:50.009544       1 route_controller.go:385] Patching node status ccm-717a8f3-md-0-qzzm2-nx6vj with false previous condition was:&NodeCondition{Type:NetworkUnavailable,Status:False,LastHeartbeatTime:2025-04-02 16:24:39 +0000 UTC,LastTransitionTime:2025-04-02 16:24:39 +0000 UTC,Reason:CiliumIsUp,Message:Cilium is running on this node,}
I0402 16:24:50.010696       1 event.go:389] "Event occurred" object="ccm-717a8f3-md-0-qzzm2-nx6vj" fieldPath="" kind="Node" apiVersion="" type="Warning" reason="FailedToCreateRoute" message="Could not create route b6231493-7793-408c-b7a6-cb9d4fe558f3 fd00::/64 for node ccm-717a8f3-md-0-qzzm2-nx6vj after 162.019903ms: [400] [ip_ranges[1]] Only IPv4 ranges are allowed"

After implementing the change, we see that the IPv6 route gets "configured", and route_controller no longer tries to configure it indefinitely.

I0403 20:14:55.698515       1 route_controller.go:214] action for Node "ccm-717a8f3-control-plane-nstww" with CIDR "10.192.0.0/24": "keep"
I0403 20:14:55.698540       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-mwkb5" with CIDR "10.192.1.0/24": "keep"
I0403 20:14:55.698546       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "10.192.2.0/24": "keep"
I0403 20:14:55.698550       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "fd00::/64": "add"
I0403 20:14:55.698562       1 route_controller.go:288] route spec to be created: &{ ccm-717a8f3-md-0-qzzm2-nx6vj false [{Hostname ccm-717a8f3-md-0-qzzm2-nx6vj} {InternalIP 10.0.0.4} {InternalIP 192.168.148.132} {ExternalIP 172.233.184.144} {ExternalIP 2a01:7e04::f03c:95ff:fe07:d941}] fd00::/64 false}
I0403 20:14:55.698589       1 route_controller.go:302] Creating route for node ccm-717a8f3-md-0-qzzm2-nx6vj fd00::/64 with hint b6231493-7793-408c-b7a6-cb9d4fe558f3, throttled 260ns
I0403 20:14:55.698688       1 route_controller.go:323] Created route for node ccm-717a8f3-md-0-qzzm2-nx6vj fd00::/64 with hint b6231493-7793-408c-b7a6-cb9d4fe558f3 after 88.74µs
I0403 20:14:55.698842       1 route_controller.go:376] set node ccm-717a8f3-md-0-qzzm2-nx6vj with NodeNetworkUnavailable=false was canceled because it is already set
I0403 20:14:55.698855       1 route_controller.go:376] set node ccm-717a8f3-control-plane-nstww with NodeNetworkUnavailable=false was canceled because it is already set
I0403 20:14:55.698878       1 route_controller.go:376] set node ccm-717a8f3-md-0-qzzm2-mwkb5 with NodeNetworkUnavailable=false was canceled because it is already set
I0403 20:14:57.797698       1 node_controller.go:194] NodeController will handle newly updated node (ccm-717a8f3-control-plane-nstww) metadata
I0403 20:14:57.797761       1 node_controller.go:270] "NodeController handling node metadata" node="ccm-717a8f3-control-plane-nstww"
I0403 20:14:57.797996       1 node_controller.go:280] "Skipping refresh, ttl not reached" node="ccm-717a8f3-control-plane-nstww" ttl="5m0s" metadata_age="2.291260097s"
I0403 20:15:04.833740       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-mwkb5" with CIDR "10.192.1.0/24": "keep"
I0403 20:15:04.833775       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "10.192.2.0/24": "keep"
I0403 20:15:04.833780       1 route_controller.go:214] action for Node "ccm-717a8f3-md-0-qzzm2-nx6vj" with CIDR "fd00::/64": "keep"
I0403 20:15:04.833785       1 route_controller.go:214] action for Node "ccm-717a8f3-control-plane-nstww" with CIDR "10.192.0.0/24": "keep"
I0403 20:15:04.833834       1 route_controller.go:376] set node ccm-717a8f3-control-plane-nstww with NodeNetworkUnavailable=false was canceled because it is already set
I0403 20:15:04.833844       1 route_controller.go:376] set node ccm-717a8f3-md-0-qzzm2-mwkb5 with NodeNetworkUnavailable=false was canceled because it is already set
I0403 20:15:04.833851       1 route_controller.go:376] set node ccm-717a8f3-md-0-qzzm2-nx6vj with NodeNetworkUnavailable=false was canceled because it is already set
  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?

@github-actions github-actions Bot added the bugfix for any bug fixes in the changelog. label Apr 4, 2025
Copy link
Copy Markdown
Contributor

@rahulait rahulait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.11%. Comparing base (717a8f3) to head (b52a8e2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
+ Coverage   72.98%   73.11%   +0.12%     
==========================================
  Files          14       14              
  Lines        2599     2611      +12     
==========================================
+ Hits         1897     1909      +12     
  Misses        537      537              
  Partials      165      165              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Andrews2024 Andrews2024 merged commit 8764780 into main Apr 4, 2025
9 checks passed
@Andrews2024 Andrews2024 deleted the ignore-ipv6-routes branch April 4, 2025 17:44
hcwagner pushed a commit to hcwagner/linode-cloud-controller-manager that referenced this pull request Jun 11, 2025
* Add local cache of 'configured' IPv6 routes to send to cloud-provider
* Added unit tests for CreateRoute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix for any bug fixes in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants