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

profile name should not have "_" #8493

Closed
Win0818 opened this issue Jun 16, 2020 · 5 comments · Fixed by #8648
Closed

profile name should not have "_" #8493

Win0818 opened this issue Jun 16, 2020 · 5 comments · Fixed by #8648
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. needs-solution-message Issues where where offering a solution for an error would be helpful priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@Win0818
Copy link

Win0818 commented Jun 16, 2020

Invalid value: "vm_0_10_centos": a DNS-1123 subdomain must consist of lower case alphanumeric character
@priyawadhwa priyawadhwa added the kind/support Categorizes issue or PR as a support question. label Jun 16, 2020
@priyawadhwa
Copy link

Hey @Win0818 --
I don’t yet have a clear way to replicate this issue. Do you mind adding some additional details? Here is additional information that would be helpful:

  • The exact minikube start command line used
  • The full output of the minikube start command, preferably with --alsologtostderr -v=4 for extra logging.
  • The full output of minikube logs
  • The full output of kubectl get po -A

Thank you for sharing your experience!

@priyawadhwa priyawadhwa added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 16, 2020
@afbjorklund
Copy link
Collaborator

I think this error is from kubeadm, as it needs a valid hostname.

https://en.wikipedia.org/wiki/Hostname

While a hostname may not contain other characters, such as the underscore character (_)

Easiest solution would be to rename the VM, without underscores.

@medyagh medyagh added the needs-solution-message Issues where where offering a solution for an error would be helpful label Jul 1, 2020
@medyagh
Copy link
Member

medyagh commented Jul 1, 2020

I think this error is from kubeadm, as it needs a valid hostname.

https://en.wikipedia.org/wiki/Hostname

While a hostname may not contain other characters, such as the underscore character (_)

Easiest solution would be to rename the VM, without underscores.

if that is the case we should add a solution message or not allow such profile names.

@medyagh medyagh added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2020
@medyagh medyagh changed the title Invalid value: "vm_0_10_centos": a DNS-1123 subdomain must consist of lower case alphanumeric character profile name should not have "_" Jul 1, 2020
@medyagh
Copy link
Member

medyagh commented Jul 1, 2020

I just tested this manually,

medya@~/workspace/minikube (docker_prefered) $ minikube start -p vm_0_10_centos --driver=hyperkit
😄  [vm_0_10_centos] minikube v1.12.0-beta.0 on Darwin 10.15.5
✨  Using the hyperkit driver based on user configuration
🔑  The 'hyperkit' driver requires elevated permissions. The following commands will be executed:

    $ sudo chown root:wheel /Users/medya/.minikube/bin/docker-machine-driver-hyperkit 
    $ sudo chmod u+s /Users/medya/.minikube/bin/docker-machine-driver-hyperkit 


Password: 
Sorry, try again.
Password: 
Sorry, try again.
Password: 
💿  Downloading VM boot image ...
    > minikube-v1.11.0.iso.sha256: 65 B / 65 B [-------------] 100.00% ? p/s 0s
    > minikube-v1.11.0.iso: 174.99 MiB / 174.99 MiB [] 100.00% 26.42 MiB p/s 7s
👍  Starting control plane node vm_0_10_centos in cluster vm_0_10_centos
💾  Downloading Kubernetes v1.18.3 preload ...
    > preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4: 526.01 MiB
🔥  Creating hyperkit VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
💥  initialization failed, will try again: run: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.18.3:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap": Process exited with status 3
stdout:

stderr:
W0701 18:15:18.750379    2388 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
nodeRegistration.name: Invalid value: "vm_0_10_centos": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
To see the stack trace of this error execute with --v=5 or higher


💣  Error starting cluster: run: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.18.3:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap": Process exited with status 3
stdout:

stderr:
W0701 18:15:18.925475    2419 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
nodeRegistration.name: Invalid value: "vm_0_10_centos": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
To see the stack trace of this error execute with --v=5 or higher


😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose

💣  failed to start node: startup failed: run: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.18.3:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap": Process exited with status 3
stdout:

stderr:
W0701 18:15:18.925475    2419 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
nodeRegistration.name: Invalid value: "vm_0_10_centos": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
To see the stack trace of this error execute with --v=5 or higher


😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose

@medyagh medyagh added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. and removed triage/needs-information Indicates an issue needs more information in order to work on it. kind/support Categorizes issue or PR as a support question. labels Jul 1, 2020
@jlucktay
Copy link
Contributor

jlucktay commented Jul 5, 2020

If it's a matter of limiting valid profile names to align with hostname limitations (refs 1, 2) then I'm willing to put together a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. needs-solution-message Issues where where offering a solution for an error would be helpful priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants