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

IPv6 addresses are broken due to buggy HTTP proxy check #1769

Closed
ismacasti opened this issue Sep 3, 2019 · 6 comments · Fixed by kubernetes/kubernetes#82267
Closed

IPv6 addresses are broken due to buggy HTTP proxy check #1769

ismacasti opened this issue Sep 3, 2019 · 6 comments · Fixed by kubernetes/kubernetes#82267
Assignees
Labels
area/UX kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Milestone

Comments

@ismacasti
Copy link

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version):
kubeadm version: &version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-20T11:44:48Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-20T11:45:27Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-20T11:40:58Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration:
    OpenStack
  • OS (e.g. from /etc/os-release):
    PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"
  • Kernel (e.g. uname -a):
    Linux master-0-n25-eccd-ci-02-jenkins 4.12.14-197.15-default kubeadm join on slave node fails preflight checks #1 SMP Thu Aug 1 12:18:13 UTC 2019 (8a1385f) x86_64 x86_64 x86_64 GNU/Linux
  • Others:

What happened?

kubeadm init fails on IPv6 clusters when the machine IPv6 address ends on an address that contains letters.
2001:db8::1 --> OK
2001:db8::f --> FAIL
The error message is:
[ERROR HTTPProxy]: parse https://2001:db8::f: invalid port ":f"

What you expected to happen?

kubeadm to come up and configure the control plane.

How to reproduce it (as minimally and precisely as possible)?

kubeadm init on a machine with an IPv6 address that ends in letters

Anything else we need to know?

This seems to be a parse error in Golang, reproducible here:
https://play.golang.org/p/T9lvfcRBW1c

@neolit123
Copy link
Member

This seems to be a parse error in Golang, reproducible here:
https://play.golang.org/p/T9lvfcRBW1c

hi, as you pointed out this is something in golang and not kubeadm.
to distinguish ipv6 port from address please use [ ... ]:..
and let me know if it works.

example:
https://play.golang.org/p/PbPud__MTFU

/triage support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Sep 3, 2019
@ismacasti
Copy link
Author

Hi, that's not possible. Setting the node IP addresses in kubeadm.conf with brackets does not work, kubeadm complaints that it expects an IPv4 or IPv6 address.

@ismacasti
Copy link
Author

Workaround: add --ignore-preflight-errors=HTTPProxy to kubeadm

@kad
Copy link
Member

kad commented Sep 3, 2019

I'll have a look at this. I think it is trivial to fix.
/assign

@rosti
Copy link

rosti commented Sep 3, 2019

Everywhere else we seem to be using net.JoinHostPort which does the proper bracket wrapping for IPv6 addresses. However, in this check in particular, net.JoinHostPort is not used (because we don't take the port number into account, the check does not require that).
Hence, we need to check if the address is IPv6 and bracket wrap it if it is and it's not wrapped already.

@neolit123 neolit123 added kind/bug Categorizes issue or PR as related to a bug. area/UX and removed kind/support Categorizes issue or PR as a support question. labels Sep 3, 2019
@neolit123 neolit123 added this to the v1.16 milestone Sep 3, 2019
@neolit123 neolit123 added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Sep 3, 2019
@ismacasti
Copy link
Author

Thanks a lot!!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UX kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants