Add DRV_DOCKER_NOT_RUNNING error for cases where specifically docker fails.
parent
b2d771cd89
commit
d59570c1f0
|
@ -605,14 +605,20 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis
|
|||
out.Infof("{{ .name }}: Suggestion: {{ .suggestion}}", out.V{"name": r.Name, "suggestion": r.Suggestion})
|
||||
}
|
||||
}
|
||||
foundStoppedDocker := false
|
||||
foundUnhealthy := false
|
||||
for _, reject := range rejects {
|
||||
if reject.State.Installed && !reject.State.Healthy {
|
||||
if reject.Name == driver.Docker && reject.State.Installed && !reject.State.Running {
|
||||
foundStoppedDocker = true
|
||||
break
|
||||
} else if reject.State.Installed && !reject.State.Healthy {
|
||||
foundUnhealthy = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if foundUnhealthy {
|
||||
if foundStoppedDocker {
|
||||
exit.Message(reason.DrvDockerNotRunning, "Found docker, but the docker service isn't running. Try restarting the docker service.")
|
||||
} else if foundUnhealthy {
|
||||
exit.Message(reason.DrvNotHealthy, "Found driver(s) but none were healthy. See above for suggestions how to fix installed drivers.")
|
||||
} else {
|
||||
exit.Message(reason.DrvNotDetected, "No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/")
|
||||
|
|
|
@ -224,6 +224,7 @@ var (
|
|||
DrvNotFound = Kind{ID: "DRV_NOT_FOUND", ExitCode: ExDriverNotFound}
|
||||
DrvNotDetected = Kind{ID: "DRV_NOT_DETECTED", ExitCode: ExDriverNotFound}
|
||||
DrvNotHealthy = Kind{ID: "DRV_NOT_HEALTHY", ExitCode: ExDriverNotFound}
|
||||
DrvDockerNotRunning = Kind{ID: "DRV_DOCKER_NOT_RUNNING", ExitCode: ExDriverNotFound}
|
||||
DrvAsRoot = Kind{ID: "DRV_AS_ROOT", ExitCode: ExDriverPermission}
|
||||
DrvNeedsRoot = Kind{ID: "DRV_NEEDS_ROOT", ExitCode: ExDriverPermission}
|
||||
DrvNeedsAdministrator = Kind{ID: "DRV_NEEDS_ADMINISTRATOR", ExitCode: ExDriverPermission}
|
||||
|
|
Loading…
Reference in New Issue