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] : remove duplicate ip's to avoid patching error #243

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

rahulait
Copy link
Contributor

General:

  • 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?

We saw patch failures in CCM logs as defined below:

I1113 06:53:01.009080       1 instances.go:300] Instance kube2-control-plane-spwkz, assembled IP addresses: [{Hostname kube2-control-plane-spwkz} {InternalIP 10.0.0.2} {ExternalIP 172.232.3.128} {InternalIP 192.168.136.12} {ExternalIP 2600:3c06::f03c:95ff:feee:5519} {InternalIP 10.0.0.2} {InternalIP 192.168.136.12}]
E1113 06:53:01.020122       1 node_controller.go:404] Error patching node with cloud ip addresses = [failed to patch status "{\"status\":{\"addresses\":[{\"address\":\"kube2-control-plane-spwkz\",\"type\":\"Hostname\"},{\"address\":\"10.0.0.2\",\"type\":\"InternalIP\"},{\"address\":\"172.232.3.128\",\"type\":\"ExternalIP\"},{\"address\":\"192.168.136.12\",\"type\":\"InternalIP\"},{\"address\":\"2600:3c06::f03c:95ff:feee:5519\",\"type\":\"ExternalIP\"},{\"address\":\"10.0.0.2\",\"type\":\"InternalIP\"},{\"address\":\"192.168.136.12\",\"type\":\"InternalIP\"},{\"$patch\":\"replace\"}]}}" for node "kube2-control-plane-spwkz": Node "kube2-control-plane-spwkz" is invalid: [status.addresses[3]: Duplicate value: core.NodeAddress{Type:"InternalIP", Address:"10.0.0.2"}, status.addresses[4]: Duplicate value: core.NodeAddress{Type:"InternalIP", Address:"192.168.136.12"}]]

This PR addresses this issue and makes sure values are not duplicated.

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?
  8. Have you linked your PR to an open issue

@rahulait rahulait added the bugfix for any bug fixes in the changelog. label Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 55.33%. Comparing base (1b046af) to head (38142ec).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cloud/linode/instances.go 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   55.30%   55.33%   +0.02%     
==========================================
  Files          12       12              
  Lines        2318     2324       +6     
==========================================
+ Hits         1282     1286       +4     
- Misses        886      887       +1     
- Partials      150      151       +1     

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

@rahulait rahulait merged commit dc407dd into main Nov 13, 2024
6 checks passed
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.

3 participants