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

unable to spawn jupyter notebook - volume name is too long #1177

Closed
kkasravi opened this issue Jul 11, 2018 · 6 comments
Closed

unable to spawn jupyter notebook - volume name is too long #1177

kkasravi opened this issue Jul 11, 2018 · 6 comments

Comments

@kkasravi
Copy link
Contributor

using IAP and a G suite account kam.d.kasravi@intel.com I get the following error when attempting to create the POD

Error: (422) Reason: error HTTP response headers: HTTPHeaderDict({'Audit-Id': '18fc2109-861e-4c94-943e-1946b9dbc2e5', 'Content-Type': 'application/json', 'Date': 'Wed, 11 Jul 2018 14:53:33 GMT', 'Content-Length': '942'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Pod "jupyter-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom" is invalid: [spec.volumes[0].name: Invalid value: "volume-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom": must be no more than 63 characters, spec.containers[0].volumeMounts[0].name: Not found: "volume-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom"]","reason":"Invalid","details":{"name":"jupyter-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom","kind":"Pod","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: "volume-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom": must be no more than 63 characters","field":"spec.volumes[0].name"},{"reason":"FieldValueNotFound","message":"Not found: "volume-accounts-2egoogle-2ecom-3akam-2ed-2ekasravi-40intel-2ecom"","field":"spec.containers[0].volumeMounts[0].name"}]},"code":422}

@jlewi jlewi changed the title unable to spawn jupyter notebook unable to spawn jupyter notebook - pod name is too long Jul 11, 2018
@jlewi
Copy link
Contributor

jlewi commented Jul 11, 2018

I think the problem is that kubeform_spawner is using the user id in the pod name and not truncating it in the case when pod names end up too long.

I don't think this issue is necessarily GCP or IAP specific. Its probably just more likely in that case because we are using the user's email which tends to be longer. Wheras using username probably leads to shorter issues.

@jlewi
Copy link
Contributor

jlewi commented Jul 11, 2018

It doesn't look like our existing spawner specifies a pattern for the pod name
https://github.com/kubeflow/kubeflow/blob/master/kubeflow/core/kubeform_spawner.py

@jlewi
Copy link
Contributor

jlewi commented Jul 11, 2018

It looks like kube spawner has an option
pod_name_template
http://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#module-kubespawner.spawner

@jlewi
Copy link
Contributor

jlewi commented Jul 11, 2018

Might
Need to wait for 0.2.2 I don't want to keep blocking 0.2.1

@jlewi
Copy link
Contributor

jlewi commented Jul 11, 2018

Some suggestions

  • Truncate pod name

    • Ideally we'd use a deterministic hash of the full name to avoid conflicts but not sure if kube spawner
      makes that doable.
  • Can we add a label for the username? Also truncated

@kkasravi
Copy link
Contributor Author

I'll submit a PR with a config pod_name_template and pvc_name_template

Code to create the names is here

@kkasravi kkasravi changed the title unable to spawn jupyter notebook - pod name is too long unable to spawn jupyter notebook - volume name is too long Jul 13, 2018
yanniszark pushed a commit to arrikto/kubeflow that referenced this issue Feb 15, 2021
* python SDK for katib with docs and examples

* Update README.md

* Update README.md

* Update bayesianoptimization-katib-sdk.ipynb

* Update bayesianoptimization-katib-sdk.ipynb

* Update tfjob-katib-sdk.ipynb

* Create OWNERS

* Update bayesianoptimization-katib-sdk.ipynb

* Update tfjob-katib-sdk.ipynb

* Update bayesianoptimization-katib-sdk.ipynb

* Update tfjob-katib-sdk.ipynb

* Update bayesianoptimization-katib-sdk.ipynb

* Update OWNERS

* Update README.md

* updated changes as per review comments

* Update README.md

* Update README.md

* Added pip installation for katib sdk and removed status from get_optimal_hyperparamater API

* Update README.md

* Updated changes for delete_exp and removed unused imports
surajkota pushed a commit to surajkota/kubeflow that referenced this issue Jun 13, 2022
Signed-off-by: Abhilash Pallerlamudi <stp.abhi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants