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

Confusing error message when starting minikube with insufficient cpus #10386

Closed
seanrmurphy opened this issue Feb 6, 2021 · 3 comments · Fixed by #10388
Closed

Confusing error message when starting minikube with insufficient cpus #10386

seanrmurphy opened this issue Feb 6, 2021 · 3 comments · Fixed by #10388
Assignees
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. os/linux priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@seanrmurphy
Copy link

System:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Minikube start:

$ minikube start --memory=6000 --cpus=6 --kubernetes-version=v1.14.1
* minikube v1.17.1 on Ubuntu 20.04 (amd64)
* Automatically selected the docker driver. Other choices: ssh, none
* Starting control plane node minikube in cluster minikube
* Creating docker container (CPUs=6, Memory=6000MB) ...

X Exiting due to RSRC_INSUFFICIENT_CORES: Docker has less than 2 CPUs available, but Kubernetes requires at least 2 to be available

This is running on a VM with 4 vCPUs - clearly requesting 6 vCPUs was not sensible, but the error message could be made a little more abstract/generic as, in this case, Docker had more than 2 (v)CPUs available. Looks like a change to this line is required:

exit.Message(reason.RsrcInsufficientCores, "Docker has less than 2 CPUs available, but Kubernetes requires at least 2 to be available")

(I originally posted here but was advised this is a separate issue).

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. labels Feb 6, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented Feb 6, 2021

Actually the real error message from docker is in the log, but it gets "translated" by minikube

docker: Error response from daemon: Range of CPUs is from 0.01 to 4.00, as there are only 4 CPUs available.

It is supposed to get validated by start in validateCPUCount, but only checks the minimum...

It would probably be a good idea to check that the limit is not higher than the number available ?

@BLasan
Copy link
Contributor

BLasan commented Feb 6, 2021

Actually the real error message from docker is in the log, but it gets "translated" by minikube

docker: Error response from daemon: Range of CPUs is from 0.01 to 4.00, as there are only 4 CPUs available.

It is supposed to get validated by start in validateCPUCount, but only checks the minimum...

It would probably be a good idea to check that the limit is not higher than the number available ?

Can I work on this?

@BLasan
Copy link
Contributor

BLasan commented Feb 6, 2021

/assign

@sharifelgamal sharifelgamal added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. os/linux priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants