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

Failed to start container: unable to sethostname when calling #5829

Closed
yujuhong opened this issue Mar 24, 2015 · 2 comments · Fixed by #5830
Closed

Failed to start container: unable to sethostname when calling #5829

yujuhong opened this issue Mar 24, 2015 · 2 comments · Fixed by #5830
Assignees
Labels
area/kubelet area/test kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@yujuhong
Copy link
Contributor

The e2e tests started failing sometime this afternoon because docker was not able to set the hostname.

Sample e2e run: go/k8healthz/job/kubernetes-e2e-gce/3797/consoleFull
The log is full of sethostname errors:

Error syncing pod, skipping: API error (500): Cannot start container 48c57647f75fba98c3ed7d82574e3fdad936d87c4f352773bf7c5a1b7fe6d5c1: unable to sethostname "fluentd-to-elasticsearch-e2e-test-jenkins-minion-4gnu.c.kubernetes-jenkins.internal": invalid argument

kubelet uses pod.name as the container hostname (I am not sure why). In the example above, the hostname is 83 characters, which has exceeded the max length of 64 on the system.

The cause of this is that static pods (i.e., pods from file/http sources) use podName-hostname as the actual pod name so that we can distinguish pods from different nodes. #5775 replaced os.Hostname() with kubelet.Hostname. This led to the change of hostname from
e2e-test-jenkins-minion-4gnu to e2e-test-jenkins-minion-4gnu.c.kubernetes-jenkins.internal, thus exceeding the limit.

@yujuhong yujuhong added kind/bug Categorizes issue or PR as related to a bug. area/test area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Mar 24, 2015
@vmarmol vmarmol self-assigned this Mar 24, 2015
@vmarmol
Copy link
Contributor

vmarmol commented Mar 24, 2015

Assigning to myself, will send a quick path capping the hostname size so that we unblock the night crew :) we should get a better fix in later.

vmarmol added a commit to vmarmol/kubernetes that referenced this issue Mar 24, 2015
@brendandburns brendandburns added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 24, 2015
@brendandburns
Copy link
Contributor

Upgrading this to P0, tests are breaking.

jayunit100 pushed a commit to jayunit100/kubernetes that referenced this issue Mar 26, 2015
akram pushed a commit to akram/kubernetes that referenced this issue Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet area/test kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants