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

Patch bug affecting IPv6 clusters in Kubernetes 1.21 #1925

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Jan 24, 2022

Description of changes:
This applies a patch for the issue described in this Kubernetes issue..

Testing done:

  • [ ] ensure the reproducer in the reported issue does not result in nodes without the full ipv6 octet.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Member

@jpculp jpculp left a comment

Choose a reason for hiding this comment

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

LGTM pending testing.

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🎼

@webern
Copy link
Contributor

webern commented Jan 24, 2022

I approved, but the patch isn't there? Did we already have it checked in to our repo?

The aws cloud provider was not sanitizing the imds node ip before being sent to kubelet. As
a result, the address provided to the node-ip in kubelet and the one received from cloud provider
mismatched.
@cbgbt
Copy link
Contributor Author

cbgbt commented Jan 24, 2022

I approved, but the patch isn't there? Did we already have it checked in to our repo?

I made a mistake with git while renaming files and removed the patch, but I have since rectified. My mistake!

@cbgbt cbgbt merged commit 8eb4614 into bottlerocket-os:develop Jan 24, 2022
nodeIPTypes := make(map[v1.NodeAddressType]bool)
for _, nodeAddress := range cloudNodeAddresses {
- if nodeAddress.Address == nodeIP.String() {
+ if string(net.ParseIP(nodeAddress.Address)) == string(net.ParseIP(nodeIP.String())) {
Copy link

@anguslees anguslees Jan 27, 2022

Choose a reason for hiding this comment

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

This is incorrect and compares internal net.IP representations, which only compare equal 'sometimes'.

We want: if net.ParseIP(nodeAddress.Address).Equal(nodeIP) {

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the heads up, @anguslees! We've opened an issue (#1930) and are looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants