Skip to content
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

QEMU: Fix addons failing to enable #17402

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pkg/drivers/qemu/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
"k8s.io/minikube/pkg/network"
"k8s.io/minikube/pkg/util/retry"
)

const (
Expand Down Expand Up @@ -196,8 +197,14 @@ func (d *Driver) GetState() (state.State, error) {
return state.Stopped, nil
}
}
ret, err := d.RunQMPCommand("query-status")
if err != nil {
var ret map[string]interface{}
queryStatus := func() (err error) {
ret, err = d.RunQMPCommand("query-status")
return err
}
// on arm64 Macs the monitor may refuse connection for a second after creating the cluster, resulting in addons
// not being enabled, a simple retry resolves this, see: https://github.com/kubernetes/minikube/issues/17396
if err := retry.Expo(queryStatus, 1*time.Second, 10*time.Second); err != nil {
return state.Error, err
}

Expand Down
Loading