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

cluster controller fail to get cluster status #26480

Closed
mfanjie opened this issue May 28, 2016 · 2 comments
Closed

cluster controller fail to get cluster status #26480

mfanjie opened this issue May 28, 2016 · 2 comments

Comments

@mfanjie
Copy link

mfanjie commented May 28, 2016

When I create cluster with last master branch, by post request to federation apiserver, I got the following error logs

E0528 23:51:29.446498   42339 runtime.go:58] Recovered from panic: &runtime.TypeAssertionError{interfaceString:"interface {}", concreteString:"*federation.Cluster", assertedString:"*v1alpha1.Cluster", missingMethod:""} (interface conversion: interface {} is *federation.Cluster, not *v1alpha1.Cluster)
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:52
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:40
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/iface.go:182
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go:97
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go:80
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:170
<autogenerated>:25
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:248
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:128
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:103
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49
/Users/fmeng/code/kubernetes/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:103
/usr/local/go/src/runtime/asm_amd64.s:1998

and then the following error was dumped repeatedly

I0528 23:52:02.142519   42339 clustercontroller.go:127] Failed to create cluster client, err: unexpected: POD_NAMESPACE env var returned empty string
I0528 23:52:02.142525   42339 clustercontroller.go:165] Failed to Get the status of cluster: cluster179

something wrong in clustercontroller.go make the controller manager failed to get the latest cluster status, this impact other controllers like service controller which depends on the status of clusters.

The workaround is to manually call cluster status update api to update the cluster to ready, then service controller will work properly.
example:
sent put request to the cluster status api like localhost:8080/apis/federation/v1alpha1/clusters/cluster179/status
with the following body.

{
  "kind": "Cluster",
  "apiVersion": "federation/v1alpha1",
  "metadata": {
    "name": "cluster179"
  },
  "status": {
    "conditions": [{
        "type": "Ready",
        "status": "True"
    }]
  }
}
@mfanjie
Copy link
Author

mfanjie commented May 28, 2016

@huangyuqi

@mfanjie
Copy link
Author

mfanjie commented Jun 2, 2016

fixed by #26550

@mfanjie mfanjie closed this as completed Jun 2, 2016
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

No branches or pull requests

2 participants