Closed oomichi closed 5 years ago
shu:
このテストを実行してみて確認したのですが、local-up-cluster.shで起動したクラスタでは、
dashboard がいない、テストの中でもdashboard をデプロイしていない、というだけの様子です。
なので手動でdashboardをデプロイしたら、通りました。
$ wget https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml
$ vi kubernetes-dashboard.yaml
--- kubernetes-dashboard.yaml.orig 2018-10-05 17:11:40.145291494 +0000
+++ kubernetes-dashboard.yaml 2018-10-05 17:12:33.762681360 +0000
@@ -136,6 +136,7 @@
name: kubernetes-dashboard
namespace: kube-system
spec:
+ type: NodePort
ports:
- port: 80
targetPort: 9090
$ kubectl create -f kubernetes-dashboard.yaml
テスト → kube-system 配下に dashboard Pod が存在するかというチェックは通るようになった。 しかし、INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
$ go run hack/e2e.go --provider=skeleton --test --test_args="--ginkgo.focus=the\skubernetes-dashboard\sinstance\sis\salive --master-os-distro=ubuntu --node-os-distro=ubuntu" --check-version-skew=false
...
STEP: Waiting for a default service account to be provisioned in namespace
[It] should check that the kubernetes-dashboard instance is alive
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/ui/dashboard.go:52
STEP: Checking whether the kubernetes-dashboard service exists.
Oct 5 22:00:34.808: INFO: Service kubernetes-dashboard in namespace kube-system found.
STEP: Checking to make sure the kubernetes-dashboard pods are running
STEP: Checking to make sure we get a response from the kubernetes-dashboard.
Oct 5 22:00:36.868: INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
Oct 5 22:00:38.872: INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
Oct 5 22:00:40.883: INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
Oct 5 22:00:42.940: INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
Oct 5 22:00:44.914: INFO: Request to kubernetes-dashboard failed: the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
...
~ Failure [66.514 seconds]
[sig-ui] Kubernetes Dashboard
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/ui/framework.go:22
should check that the kubernetes-dashboard instance is alive [It]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/ui/dashboard.go:52
Expected error:
<*errors.errorString | 0xc420087550>: {
s: "timed out waiting for the condition",
}
timed out waiting for the condition
not to have occurred
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/ui/dashboard.go:93
テストコード
73 // Query against the proxy URL for the kubernetes-dashboard service.
74 err := proxyRequest.Namespace(uiNamespace).
75 Context(ctx).
76 Name(utilnet.JoinSchemeNamePort("https", uiServiceName, "")).
77 Timeout(framework.SingleCallTimeout).
78 Do().
79 StatusCode(&status).
80 Error()
81 if err != nil {
82 if ctx.Err() != nil {
83 framework.Failf("Request to kubernetes-dashboard failed: %v", err)
84 return true, err
85 }
86 framework.Logf("Request to kubernetes-dashboard failed: %v", err)
86 でエラーになっている。つまり proxyRequest.Namespace で失敗。 err は
the server is currently unable to handle the request (get services https:kubernetes-dashboard:)
the server is currently unable to handle the request は
369 case http.StatusServiceUnavailable:
370 reason = metav1.StatusReasonServiceUnavailable
371 message = "the server is currently unable to handle the request"
以下の理由により、ローカル環境でもスキップすることにした。
dashboard のインストール手順を調べて、「本当にコミュニティとして k8s 本体の CI でテストされんのかな」と疑問に思って調べてみたら
とスキップされてました・・・これは pull-kubernetes-e2e-kops-aws の場合
'--test_args=--ginkgo.flakeAttempts=2 --ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[HPA\]|Dashboard|Services.*functioning.*NodePort'
gke でもスキップされている。
35 var _ = SIGDescribe("Kubernetes Dashboard", func() {
36 BeforeEach(func() {
37 // TODO(kubernetes/kubernetes#61559): Enable dashboard here rather than skip the test.
38 framework.SkipIfProviderIs("gke")
39 })