-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
none driver can't be used with non-Docker runtimes (looks for "docker" executable) #5549
Comments
Interestingly, we are calling NewDriver twice. Once with correct values, once with empty ones:
This is how we end up with case "", "docker":
return &Docker{Socket: c.Socket, Runner: c.Runner}, nil
case "crio", "cri-o":
return &CRIO{Socket: c.Socket, Runner: c.Runner, ImageRepository: c.ImageRepository, KubernetesVersion: c.KubernetesVersion}, nil |
Unfortunately this suggests that something is fundamentally wrong in the Driver "registry" ? First the config is happily created by "createNoneHost", only to get clobbered by "init"'s empty |
Hopefully someone else understands how the "registry" is supposed to work, and can fix this ? An interesting story on RHEL 8 is that installing # docker version
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Version: 1.0.5
Go Version: go1.11.6
OS/Arch: linux/amd64 |
I see this error when deleting and starting minikube cluster again (no args). |
Well, the workaround is to make something/anything called "docker" available. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Still broken, in 1.8.1.
/remove-lifecycle stale |
|
Nice that the workaround works, but user should not have to install |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
This issue has to do with how the none driver 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, 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 == "", And after our unmarshal...
..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. |
The other drivers doesn't seem to have this issue: none of them seems to rely on initialized stuff after config.
Only hyperkit does an explicit (*Driver).PrecreateCheck() |
Thanks for figuring out the registry bug, it was somewhat puzzling. For reference, the upstream driver looks like this: func NewDriver(hostName, storePath string) *Driver {
return &Driver{
BaseDriver: &drivers.BaseDriver{
MachineName: hostName,
StorePath: storePath,
},
}
} With your changes, the none2 is more similar to it. |
This would probably fix some similar issues, with the "ssh" driver (generic2) Since upstream does dynamic flags, it is much simpler: func NewDriver(hostName, storePath string) drivers.Driver {
return &Driver{
EnginePort: engine.DefaultPort,
BaseDriver: &drivers.BaseDriver{
MachineName: hostName,
StorePath: storePath,
},
}
} But in minikube, the |
There is something wrong in the runtime detection of the precreate:
For some reason it is calling the wrong
Available
function ?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")
The text was updated successfully, but these errors were encountered: