Skip to content

[core-dev] registry facade in crash loop due to namespace name being too long #8169

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

Closed
sagor999 opened this issue Feb 12, 2022 · 2 comments · Fixed by #8316
Closed

[core-dev] registry facade in crash loop due to namespace name being too long #8169

sagor999 opened this issue Feb 12, 2022 · 2 comments · Fixed by #8316
Assignees

Comments

@sagor999
Copy link
Contributor

Bug description

- kubectl label --overwrite nodes ${NODENAME} gitpod.io/registry-facade_ready_ns_${KUBE_NAMESPACE}=true

  Warning  FailedPostStartHook  3m33s (x3 over 3m48s)  kubelet                                Exec lifecycle hook ([/bin/bash -c kubectl label --overwrite nodes ${NODENAME} gitpod.io/registry-facade_ready_ns_${KUBE_NAMESPACE}=true]) for Container "registry-facade" in Pod "registry-facade-4s9xq_staging-sagor999-workspace-crash-loops-7754(45eff485-2c1b-416d-8665-70016b990c58)" failed - error: command '/bin/bash -c kubectl label --overwrite nodes ${NODENAME} gitpod.io/registry-facade_ready_ns_${KUBE_NAMESPACE}=true' exited with 1: The Node "gke-core-dev-workspace-2-397a333b-3fyh" is invalid: metadata.labels: Invalid value: "gitpod.io/registry-facade_ready_ns_staging-sagor999-workspace-crash-loops-7754": name part must be no more than 63 characters
, message: "The Node \"gke-core-dev-workspace-2-397a333b-3fyh\" is invalid: metadata.labels: Invalid value: \"gitpod.io/registry-facade_ready_ns_staging-sagor999-workspace-crash-loops-7754\": name part must be no more than 63 characters\n"

KUBE_NAMESPACE env variable has to be trimmed to make sure that resulting label name is not longer than 63 characters

Steps to reproduce

Open the workspace from an issue with a very long name.
Observe that registry facade is in crash loop.

this is the namespace that was generated for my workspace:
staging-sagor999-workspace-crash-loops-7754

Workspace affected

gitpodio-gitpod-y9237ppnuc5

Expected behavior

No response

Example repository

No response

Anything else?

No response

@fullmetalrooster
Copy link
Contributor

fullmetalrooster commented Feb 17, 2022

This problem is not only for namespaces but also for domain names. Both are using the branch name as basis. Therefore we need a unique scheme how we want to shorten the branch name.

@svenefftinge
Copy link
Member

How about just cutting it off to make it fit into the 63 chars?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants