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

unit test TestCertsTLS fails when IPV6 is disabled #47304

Closed
CaoShuFeng opened this issue Jun 11, 2017 · 11 comments · Fixed by #48683
Closed

unit test TestCertsTLS fails when IPV6 is disabled #47304

CaoShuFeng opened this issue Jun 11, 2017 · 11 comments · Fixed by #48683
Labels
sig/auth Categorizes an issue or PR as relevant to SIG Auth.

Comments

@CaoShuFeng
Copy link
Contributor

CaoShuFeng commented Jun 11, 2017

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Kubernetes version (use kubectl version):
community master

Environment:

  • Cloud provider or hardware configuration: my local machine
  • OS (e.g. from /etc/os-release): linux
  • Kernel (e.g. uname -a): Linux localhost.localdomain 4.10.8-200.fc25.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Fri Mar 31 13:20:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:
    ipv6 is disabled in my environment.
    net.ipv6.conf.all.disable_ipv6=0

What happened:
$ make test WHAT=k8s.io/kubernetes/federation/pkg/kubefed/init KUBE_GOFLAGS="-v" KUBE_TEST_ARGS='-run ^TestCertsTLS$' Running tests for APIVersion: v1,admissionregistration.k8s.io/v1alpha1,admission.k8s.io/v1alpha1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,networking.k8s.io/v1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,settings.k8s.io/v1alpha1,storage.k8s.io/v1beta1,storage.k8s.io/v1,federation/v1beta1 +++ [0611 16:37:17] Running tests without code coverage === RUN TestCertsTLS --- FAIL: TestCertsTLS (5.11s) init_test.go:522: [0] unexpected error: dial tcp [::]:41981: connect: cannot assign requested address init_test.go:522: [1] unexpected error: dial tcp [::]:45949: connect: cannot assign requested address init_test.go:522: [2] unexpected error: dial tcp [::]:42481: connect: cannot assign requested address init_test.go:522: [3] unexpected error: dial tcp [::]:43051: connect: cannot assign requested address init_test.go:522: [4] unexpected error: dial tcp [::]:38445: connect: cannot assign requested address init_test.go:522: [5] unexpected error: dial tcp [::]:45791: connect: cannot assign requested address init_test.go:511: [6] unexpected error: want x509.HostnameError, got: *net.OpError init_test.go:511: [7] unexpected error: want x509.HostnameError, got: *net.OpError init_test.go:511: [8] unexpected error: want x509.HostnameError, got: *net.OpError init_test.go:511: [9] unexpected error: want x509.HostnameError, got: *net.OpError init_test.go:515: [10] unexpected error: want x509.UnknownAuthorityError, got: *net.OpError init_test.go:515: [11] unexpected error: want x509.UnknownAuthorityError, got: *net.OpError init_test.go:511: [12] unexpected error: want x509.HostnameError, got: *net.OpError init_test.go:511: [13] unexpected error: want x509.HostnameError, got: *net.OpError FAIL exit status 1 FAIL k8s.io/kubernetes/federation/pkg/kubefed/init 5.391s Makefile:164: recipe for target 'test' failed make: *** [test] Error 1

What you expected to happen:
Unit test should passes.

How to reproduce it (as minimally and precisely as possible):
This always happens in my environment.

Anything else we need to know:

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 11, 2017
@k8s-github-robot
Copy link

@CaoShuFeng There are no sig labels on this issue. Please add a sig label by:
(1) mentioning a sig: @kubernetes/sig-<team-name>-misc
(2) specifying the label manually: /sig <label>

Note: method (1) will trigger a notification to the team. You can find the team list here and label list here

@0xmichalis
Copy link
Contributor

What version of go are you using?

@CaoShuFeng
Copy link
Contributor Author

I use go version go1.8.1 linux/amd64.

@xiangpengzhao
Copy link
Contributor

/sig auth

@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Jun 15, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 15, 2017
@CaoShuFeng
Copy link
Contributor Author

When I enable IPV6, this test passes.

  1. write this to /etc/sysctl.d/99-sysctl.conf:
    sysctl -w net.ipv6.conf.all.disable_ipv6=0
  2. reboot

@CaoShuFeng CaoShuFeng changed the title unit test TestCertsTLS fails in my environment unit test TestCertsTLS fails when IPV6 is disabled Jun 26, 2017
@fraenkel
Copy link
Contributor

fraenkel commented Jul 9, 2017

The same failures are occurring with my PR's unit tests
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/48664/pull-kubernetes-unit/39682/

@ianchakeres
Copy link
Contributor

@sttts
Copy link
Contributor

sttts commented Jul 10, 2017

This is probably what we are seeing: golang/go#18806

@sttts
Copy link
Contributor

sttts commented Jul 10, 2017

And fixed in golang, probably for 1.9: https://go-review.googlesource.com/c/45088/

sttts added a commit to sttts/kubernetes that referenced this issue Jul 10, 2017
gmarek pushed a commit to gmarek/kubernetes that referenced this issue Jul 11, 2017
@abgworrall
Copy link
Contributor

I'm seeing these same k8s.io/kubernetes/federation/pkg/kubefed/init errors in PRs against the 1.7 (#48726) and 1.5 branches (#48310) . Does this fix need to be backported ?

@abgworrall
Copy link
Contributor

Oh wait, I can see it in 1.7, I'll rebase now :)

enisoc pushed a commit to enisoc/kubernetes that referenced this issue Jul 12, 2017
saad-ali pushed a commit to saad-ali/kubernetes that referenced this issue Jul 13, 2017
perotinus pushed a commit to kubernetes-retired/cluster-registry that referenced this issue Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/auth Categorizes an issue or PR as relevant to SIG Auth.
Projects
None yet
9 participants