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

[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2 #7445

Closed
ahmedawais opened this issue Apr 5, 2020 · 9 comments
Closed
Labels
co/none-driver kind/support Categorizes issue or PR as a support question. needs-solution-message Issues where where offering a solution for an error would be helpful

Comments

@ahmedawais
Copy link

i am facing the following issue during minikube start
root@awais-VirtualBox:~# minikube start --vm-driver=none
😄 minikube v1.9.2 on Ubuntu 18.04 (vbox/amd64)
✨ Using the none driver based on existing profile
👍 Starting control plane node in cluster minikube
🔄 Restarting existing none bare metal machine for "minikube" ...
ℹ️ OS release is Ubuntu 18.04.4 LTS
🐳 Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
▪ kubelet.resolv-conf=/run/systemd/resolve/resolv.conf
💥 initialization failed, will try again: run: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.18.0:$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,SystemVerification": exit status 1
stdout:
[init] Using Kubernetes version: v1.18.0
[preflight] Running pre-flight checks

stderr:
W0405 22:08:06.657551 18514 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING FileExisting-ebtables]: ebtables not found in system path
[WARNING FileExisting-ethtool]: ethtool not found in system path
[WARNING FileExisting-socat]: socat not found in system path
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
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.0:$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,SystemVerification": exit status 1
stdout:
[init] Using Kubernetes version: v1.18.0
[preflight] Running pre-flight checks

stderr:
W0405 22:08:07.853579 18678 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING FileExisting-ebtables]: ebtables not found in system path
[WARNING FileExisting-ethtool]: ethtool not found in system path
[WARNING FileExisting-socat]: socat not found in system path
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
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
root@awais-VirtualBox:~#

operating system: ubuntu (virtual machine)
Tried with the solution of conntrack and it was installed using apt install conntrack

@prasadkatti
Copy link
Contributor

prasadkatti commented Apr 5, 2020

[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2

This is the real error. Update the number of cpus on your ubuntu VM and try again.

@tstromberg tstromberg changed the title WARNING: kubeadm cannot validate component configs for API groups [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2 Apr 5, 2020
@tstromberg tstromberg added needs-solution-message Issues where where offering a solution for an error would be helpful kind/support Categorizes issue or PR as a support question. labels Apr 5, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Apr 5, 2020

Agreed. Let me know if it doesn't help for some reason.

Adding needs-solution-message tag because we can improve the error message.

@prasadkatti
Copy link
Contributor

@tstromberg - Is it possible to run just kubeadm init phase preflight -v <some_level> and control the output so that it only outputs the errors and not the warnings? If yes, then we could run that before running the actual init?

@prasadkatti
Copy link
Contributor

I would like to help with this issue if I could get some help.

@ahmedawais
Copy link
Author

@prasadkatti the issue has been resolved by increasing the CPU from 1 to 2.
you can close the issue. Thanks

@afbjorklund
Copy link
Collaborator

We should probably validate both CPU (2) and Memory (2G) earlier, when using the none driver.

This also asks why even support it, since it only prevents people from reading kubeadmdocs ?

@afbjorklund
Copy link
Collaborator

Also seen in #6961

@afbjorklund
Copy link
Collaborator

Also seen in #7782

@afbjorklund
Copy link
Collaborator

Also seen in #7907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/support Categorizes issue or PR as a support question. needs-solution-message Issues where where offering a solution for an error would be helpful
Projects
None yet
Development

No branches or pull requests

4 participants