Skip to content

Commit

Permalink
Merge pull request #17402 from spowelljr/qemuAddonEnable
Browse files Browse the repository at this point in the history
QEMU: Fix addons failing to enable
  • Loading branch information
medyagh authored Oct 13, 2023
2 parents 697bc9c + 0345e29 commit 74851f3
Showing 1 changed file with 9 additions and 2 deletions.
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

0 comments on commit 74851f3

Please sign in to comment.