-
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
Solves docker cruntime notavail bug for --driver=none #16936
Conversation
Hi @x7upLime. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: x7upLime The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can one of the admins verify this patch? |
// Libraries shouldn't panic, but there is no way for drivers to return error :( | ||
if err != nil { | ||
klog.Fatalf("unable to create container runtime: %v", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just no point in initializing d.exec, d.runtime at this phase, since init is only called before the json marshal/unmarshal mechanism of libmachine, i.e. it would not survive that.
pkg/drivers/none/none.go
Outdated
d.exec = runner | ||
|
||
fmt.Printf("We've put a command runner inside Driver in PrecreateCheck: %#v\n\n\n", d.exec) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we initialize runner/runtime here, since it's the first method from the driver, that gets called when creating the machine
@@ -125,6 +131,9 @@ func (d *Driver) GetURL() (string, error) { | |||
|
|||
// GetState returns the state that the host is in (running, stopped, etc) | |||
func (d *Driver) GetState() (state.State, error) { | |||
runner := command.NewExecRunner(true) | |||
d.exec = runner | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also initialize a runner here, since it is expected after provisioning phase, for enabling addons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz paste the output of minikube start with the followinfg conditions
1- no docker in path
$ which docker
2- have containerd installed
3- minikube start --driver=none --container-runtime=containerd
4- kubecltl get pods -A
Reminder for myself: |
Unfortunately putting the runtime/exec fields inside the CommonDriver still won't get those past the marshal/unmarshal stage in the driver lifecycle:
The patch that I used:
|
/ok-to-test |
/test pull-minikube-build |
kvm2 driver with docker runtime
Times for minikube start: 48.8s 53.0s 51.4s 50.8s 48.7s Times for minikube ingress: 29.0s 28.0s 27.6s 28.6s 27.6s docker driver with docker runtime
Times for minikube start: 22.0s 24.1s 21.4s 23.8s 24.7s Times for minikube ingress: 20.8s 20.8s 20.8s 20.8s 20.8s docker driver with containerd runtime
Times for minikube start: 20.3s 20.2s 22.6s 23.1s 23.8s Times for minikube ingress: 31.3s 31.3s 19.3s 32.3s 31.3s |
These are the flake rates of all failed tests.
Too many tests failed - See test logs for more details. To see the flake rates of all tests by environment, click here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@x7upLime It looks like because you removed setting exec and runtime in NewDriver
they're nil and can run into nil panics
Solves the docker cruntime not avail bug, that occurs whenever using none driver with any container runtime other than docker.
fixes #5549
fixes #10908
fixes #16722
minikube start --driver=none --container-runtime=containerd
which docker
which containerd
ubuntu@minikube:~/minikube$ sudo -E ./out/minikube kubectl -- get po -A
Needs
sudo sysctl fs.protected_regular=0
.Check: HOST_JUJU_LOCK_PERMISSION here