minikube: none driver can't be used with non-Docker runtimes (looks for "docker" executable)
There is something wrong in the runtime detection of the precreate:
$ sudo minikube start --vm-driver=none --container-runtime=cri-o
š minikube v1.4.0 on Ubuntu 16.04
𤹠Running on localhost (CPUs=4, Memory=7800MB, Disk=138379MB) ...
š Retriable failure: create: precreate: exec: "docker": executable file not found in $PATH
𤹠Running on localhost (CPUs=4, Memory=7800MB, Disk=138379MB) ...
š Retriable failure: create: precreate: exec: "docker": executable file not found in $PATH
𤹠Running on localhost (CPUs=4, Memory=7800MB, Disk=138379MB) ...
š Retriable failure: create: precreate: exec: "docker": executable file not found in $PATH
^C
For some reason it is calling the wrong Available function ?
func (r *Docker) Available() error {
_, err := exec.LookPath("docker")
return err
}
func (r *CRIO) Available() error {
return r.Runner.Run("command -v crio")
}
And the docker runtime seems to be checking locally ? (I guess us using docker machine makes it always there)
It also forgot to look for crictl, but that is another story.
(and interesting how this is regarded as a āretriable failureā)
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 1
- Comments: 15 (2 by maintainers)
This issue has to do with how the none driver is designed, relative to how createHost[pkg/minikube/machine/start.go] is designed:
timedCreateHost() in turn, calls api.Create, passing the *host.Host, which contains the driver weāve *initialized" inside api.NewHost.
The thing is that NewHost (which doesnāt have access to the cluster config) does this annoying thing:
After the json.Unmarshal, thatās the driver weāre ending with.
Thatās how the none driver looks like:
it relies on runtime and exec, which have to be initialized, but nothing that is to be initialized would pass the marshal/unmarshal thing in api.NewHost.
So what is happening is that when def.Init() is called inside api.NewHost:
a none.NewDriver call is issued, with an empty none.Configā¦
(makes sense, 'cause we shouldnāt know anything about the driver during initialization⦠thatās what config should be for)
So that weāre initializing a cruntime with ac.ContainerRuntime == āā, which defaults to docker:
case "", "docker":, inside pkg/minikube/cruntime/cruntime.go So no container-runtime config should work with the none driver during this step.And after our unmarshal⦠(raw json looking like this:
ā¦the runtime field of the struct is not even exported, so there is no way even for the runtime config to be passed on.)
the runtime remains docker.