Skip to content

Commit

Permalink
Add condition to check --cpus count with available cpu count
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Feb 6, 2021
1 parent bdd1e6d commit 8b84fa7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,10 @@ func validateCPUCount(drvName string) {

}

if si.CPUs < cpuCount {
exitIfNotForced(reason.RsrcInsufficientCores, "Requested cpu count {{.requested_cpus}} is greater than the available cpus of {{.avail_cpus}}", out.V{"requested_cpus": cpuCount, "avail_cpus": si.CPUs})
}

// looks good
if si.CPUs >= 2 {
return
Expand Down

0 comments on commit 8b84fa7

Please sign in to comment.