pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 493 forks source link

scheduler: MountVolume.NodeAffinity check failed for volume "" : No matching NodeSelectorTerms #381

Closed xiaojingchen closed 5 years ago

xiaojingchen commented 5 years ago

k8s version:

Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:43:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
xiaojingchen commented 5 years ago

found the issue which explains the bug: https://github.com/kubernetes/kubernetes/issues/69928 PTAL

weekface commented 5 years ago

This is fixed in v1.14: https://github.com/kubernetes/kubernetes/pull/70026

@onlymellb @tennix We may need to upgrade to v1.14.

aylei commented 5 years ago

This is fixed in v1.14: kubernetes/kubernetes#70026

@onlymellb @tennix We may need to upgrade to v1.14.

Can we port this to 1.12? Most of hosted-kubernetes vendors using 1.12 now.

xiaojingchen commented 5 years ago

I wonder why this bug didn't appear before, but it recurs frequently now. We've been using v1.12.2.

xiaojingchen commented 5 years ago

the reason is that the kubernetes cluster have two tidb-scheduler. we should provide a mechanism to ensure that there is only one tidb-operator in k8s cluster.

weekface commented 5 years ago

308