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

Dashboard panics on getting heapster selector when stateful sets not supported by cluster #1916

Closed
ghost opened this issue May 5, 2017 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ghost
Copy link

ghost commented May 5, 2017

Issue details

Environment
Dashboard version:
Kubernetes version:
Operating system:
Node.js version:
Go version:
Steps to reproduce
Observed result

Dashboard reported Unknown Server Error (500):

[restful] recover from panic situation: - Failed to create heapster selector for resource "statefulset". Error: GetMyPodsFromCache: pods were not available in cache. Required for resource type: "statefulset"
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/runtime/asm_amd64.s:472
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/runtime/panic.go:426
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/resource/dataselect/dataselect.go:157
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/resource/dataselect/dataselect.go:210
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/resource/statefulset/statefulsetlist/statefulsetlist.go:116
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/resource/statefulset/statefulsetlist/statefulsetlist.go:100
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/resource/statefulset/statefulsetlist/statefulsetlist.go:68
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/handler/apihandler.go:622
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/handler/apihandler.go:523
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/container.go:267
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/filter.go:21
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/handler/apihandler.go:135
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/filter.go:19
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/handler/apihandler.go:97
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/filter.go:19
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/src/app/backend/handler/apihandler.go:153
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/filter.go:19
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/container.go:269
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/container.go:120
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/net/http/server.go:1618
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/net/http/server.go:1910
    /home/travis/build/kubernetes/dashboard/.tmp/backend/src/github.com/kubernetes/dashboard/vendor/github.com/emicklei/go-restful/container.go:287
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/net/http/server.go:1910
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/net/http/server.go:2081
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/net/http/server.go:1472
    /home/travis/.gimme/versions/go1.6.1.linux.amd64/src/runtime/asm_amd64.s:1998

Expected result
Comments
@floreks
Copy link
Member

floreks commented May 8, 2017

What is your kubernetes version? I have found only 1 situation where this error might occur and it is if cluster does not support stateful sets. We should fix that anyway.

I have renamed issue title because this one is too generic.

@floreks floreks added kind/bug Categorizes issue or PR as related to a bug. priority/P1 labels May 8, 2017
@floreks floreks changed the title Dashboard reported Unknown Server Error (500) Dashboard panics on getting heapster selector when stateful sets not supported by cluster May 8, 2017
@aliakhtar
Copy link

I'm encountering this issue as well:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:44:27Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T20:22:08Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

My cluster only had one ss and pod when this happened - deleting and re-creating the ss caused the error to go away. Will post stacktrace if i encounter it again

@floreks
Copy link
Member

floreks commented Jul 5, 2017

We will remove this check and return no metrics instead of panic.

@floreks
Copy link
Member

floreks commented Jul 5, 2017

I have checked and this is already fixed by #2017.

@floreks floreks closed this as completed Jul 5, 2017
@jasonyihk
Copy link

one side note: the same error will pop up if you have typo in the yaml file for statefulset. e.g. imagePullPolicy: always, which should be Always. in case anyone run into the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants