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

Scheduler predicates test that may violate DNS label rules #55117

Closed
pires opened this issue Nov 5, 2017 · 1 comment · Fixed by #55119
Closed

Scheduler predicates test that may violate DNS label rules #55117

pires opened this issue Nov 5, 2017 · 1 comment · Fixed by #55119
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@pires
Copy link
Contributor

pires commented Nov 5, 2017

/kind bug
cc @kubernetes/sig-scheduling-bugs

What happened: Running one scheduling predicates conformance test on a 1.7.10 cluster where node names are FQDN, e.g. kube-node-0.kubernetes.mesos, fails.

[21:36:48][Step 4/8] • Failure [83.160 seconds]
[21:36:48][Step 4/8] [k8s.io] SchedulerPredicates [Serial]
[21:36:48][Step 4/8] /pkg/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:619
[21:36:48][Step 4/8]   validates resource limits of pods that are allowed to run [Conformance] [It]
[21:36:48][Step 4/8]   /pkg/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/scheduling/predicates.go:160
[21:36:48][Step 4/8] 
[21:36:48][Step 4/8]   Expected error:
[21:36:48][Step 4/8]       <*errors.StatusError | 0xc42022bb80>: {
[21:36:48][Step 4/8]           ErrStatus: {
[21:36:48][Step 4/8]               TypeMeta: {Kind: "", APIVersion: ""},
[21:36:48][Step 4/8]               ListMeta: {SelfLink: "", ResourceVersion: ""},
[21:36:48][Step 4/8]               Status: "Failure",
[21:36:48][Step 4/8]               Message: "Pod \"filler-pod-kube-node-5-kubelet.kubernetes.mesos\" is invalid: spec.containers[0].name: Invalid value: \"filler-pod-kube-node-5-kubelet.kubernetes.mesos\": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')",
[21:36:48][Step 4/8]               Reason: "Invalid",
[21:36:48][Step 4/8]               Details: {
[21:36:48][Step 4/8]                   Name: "filler-pod-kube-node-5-kubelet.kubernetes.mesos",
[21:36:48][Step 4/8]                   Group: "",
[21:36:48][Step 4/8]                   Kind: "Pod",
[21:36:48][Step 4/8]                   UID: "",
[21:36:48][Step 4/8]                   Causes: [
[21:36:48][Step 4/8]                       {
[21:36:48][Step 4/8]                           Type: "FieldValueInvalid",
[21:36:48][Step 4/8]                           Message: "Invalid value: \"filler-pod-kube-node-5-kubelet.kubernetes.mesos\": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')",
[21:36:48][Step 4/8]                           Field: "spec.containers[0].name",
[21:36:48][Step 4/8]                       },
[21:36:48][Step 4/8]                   ],
[21:36:48][Step 4/8]                   RetryAfterSeconds: 0,
[21:36:48][Step 4/8]               },
[21:36:48][Step 4/8]               Code: 422,
[21:36:48][Step 4/8]           },
[21:36:48][Step 4/8]       }
[21:36:48][Step 4/8]       Pod "filler-pod-kube-node-5-kubelet.kubernetes.mesos" is invalid: spec.containers[0].name: Invalid value: "filler-pod-kube-node-5-kubelet.kubernetes.mesos": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
[21:36:48][Step 4/8]   not to have occurred
[21:36:48][Step 4/8] 
[21:36:48][Step 4/8]   /pkg/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/scheduling/predicates.go:807

What you expected to happen: The tests should pass.

How to reproduce it (as minimally and precisely as possible):

Follow these instructions to deploy Kubernetes 1.7.10 on DC/OS or bootstrap a Kubernetes cluster where nodes names are FQDN, e.g. my-node-1.example.com.

Anything else we need to know?:

Also affects master but not 1.8.x.

Environment:

  • Kubernetes version (use kubectl version):
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.10", GitCommit:"bebdeb749f1fa3da9e1312c4b08e439c404b3136", GitTreeState:"clean", BuildDate:"2017-11-03T16:31:49Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: GCP
  • OS (e.g. from /etc/os-release):
$ cat /etc/lsb-release
DISTRIB_ID="Container Linux by CoreOS"
DISTRIB_RELEASE=1465.6.0
DISTRIB_CODENAME="Ladybug"
DISTRIB_DESCRIPTION="Container Linux by CoreOS 1465.6.0 (Ladybug)"
  • Kernel (e.g. uname -a):
$ uname -a
Linux pires-aa53f593-private-agents-ff9n.c.massive-bliss-781.internal 4.12.7-coreos #1 SMP Tue Aug 15 23:54:56 UTC 2017 x86_64 Intel(R) Xeon(R) CPU @ 2.30GHz GenuineIntel GNU/Linux
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/bug Categorizes issue or PR as related to a bug. labels Nov 5, 2017
@pires pires changed the title 1.7.x scheduler predicates test that may violate DNS label rules Scheduler predicates test that may violate DNS label rules Nov 5, 2017
@pires
Copy link
Contributor Author

pires commented Nov 6, 2017

Cherry-pick for 1.7.x #55156.

Again, it doesn't seem to affect 1.8.x.

nikhita pushed a commit to nikhita/kubernetes that referenced this issue Nov 6, 2017
…dicates_hostname

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix scheduler predicates test that may violate DNS label rules

**What this PR does / why we need it**:

This commit fixes an issue where in clusters which have FQDN as the node names,
one of the scheduling predicates tests will fail because it will try and run a
pod with a name that violates DNS-1123 rules. As an example, one such pod name
could look like "filler-pod-kube-node-0.kubelet.mesos".

**Which issue(s) this PR fixes**:
Fixes kubernetes#55117

**Special notes for your reviewer**:

As soon as this is approved, I will create the cherry-pick PRs for 1.7.x. It doesn't apply on 1.8.x.

cc @aveshagarwal @kubernetes/sig-scheduling-pr-reviews 

**Release note**:
```
NONE
```
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. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants