diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 6b14c8c4e545..050d9f68909a 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -170,7 +170,7 @@ func initMinikubeFlags() { startCmd.Flags().String(criSocket, "", "The cri socket path to be used.") startCmd.Flags().String(networkPlugin, "", "The name of the network plugin.") startCmd.Flags().Bool(enableDefaultCNI, false, "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \"--network-plugin=cni\".") - startCmd.Flags().Bool(waitUntilHealthy, false, "Wait until Kubernetes core services are healthy before exiting.") + startCmd.Flags().Bool(waitUntilHealthy, true, "Block until the apiserver is servicing API requests") startCmd.Flags().Duration(waitTimeout, 6*time.Minute, "max time to wait per Kubernetes core services to be healthy.") startCmd.Flags().Bool(nativeSSH, true, "Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.") startCmd.Flags().Bool(autoUpdate, true, "If set, automatically updates drivers to the latest version. Defaults to true.") @@ -365,7 +365,13 @@ func runStart(cmd *cobra.Command, args []string) { if driverName == driver.None { prepareNone() } - waitCluster(bs, config) + + // Skip pre-existing, because we already waited for health + if viper.GetBool(waitUntilHealthy) && !preExists { + if err := bs.WaitForCluster(config.KubernetesConfig, viper.GetDuration(waitTimeout)); err != nil { + exit.WithError("Wait failed", err) + } + } if err := showKubectlInfo(kubeconfig, k8sVersion, config.Name); err != nil { glog.Errorf("kubectl info: %v", err) } @@ -389,18 +395,6 @@ func enableAddons() { } } -func waitCluster(bs bootstrapper.Bootstrapper, config cfg.MachineConfig) { - var podsToWaitFor []string - - if !viper.GetBool(waitUntilHealthy) { - // only wait for apiserver if wait=false - podsToWaitFor = []string{"apiserver"} - } - if err := bs.WaitForPods(config.KubernetesConfig, viper.GetDuration(waitTimeout), podsToWaitFor); err != nil { - exit.WithError("Wait failed", err) - } -} - func displayVersion(version string) { prefix := "" if viper.GetString(cfg.MachineProfile) != constants.DefaultMachineName { diff --git a/pkg/minikube/bootstrapper/bootstrapper.go b/pkg/minikube/bootstrapper/bootstrapper.go index f0b244f3e74b..f54c0b4f41b5 100644 --- a/pkg/minikube/bootstrapper/bootstrapper.go +++ b/pkg/minikube/bootstrapper/bootstrapper.go @@ -41,7 +41,7 @@ type Bootstrapper interface { UpdateCluster(config.KubernetesConfig) error RestartCluster(config.KubernetesConfig) error DeleteCluster(config.KubernetesConfig) error - WaitForPods(config.KubernetesConfig, time.Duration, []string) error + WaitForCluster(config.KubernetesConfig, time.Duration) error // LogCommands returns a map of log type to a command which will display that log. LogCommands(LogOptions) map[string]string SetupCerts(cfg config.KubernetesConfig) error diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 7e9c27e41b0d..08f1d857c248 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -38,8 +38,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/viper" "golang.org/x/sync/errgroup" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" kconst "k8s.io/kubernetes/cmd/kubeadm/app/constants" @@ -66,7 +65,6 @@ const ( defaultCNIConfigPath = "/etc/cni/net.d/k8s.conf" kubeletServiceFile = "/lib/systemd/system/kubelet.service" kubeletSystemdConfFile = "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf" - AllPods = "ALL_PODS" ) const ( @@ -96,22 +94,6 @@ var KubeadmExtraArgsWhitelist = map[int][]string{ }, } -type pod struct { - // Human friendly name - name string - key string - value string -} - -// PodsByLayer are queries we run when health checking, sorted roughly by dependency layer -var PodsByLayer = []pod{ - {"proxy", "k8s-app", "kube-proxy"}, - {"etcd", "component", "etcd"}, - {"scheduler", "component", "kube-scheduler"}, - {"controller", "component", "kube-controller-manager"}, - {"dns", "k8s-app", "kube-dns"}, -} - // yamlConfigPath is the path to the kubeadm configuration var yamlConfigPath = path.Join(vmpath.GuestEphemeralDir, "kubeadm.yaml") @@ -166,12 +148,13 @@ func (k *Bootstrapper) GetAPIServerStatus(ip net.IP, apiserverPort int) (string, } client := &http.Client{Transport: tr} resp, err := client.Get(url) - glog.Infof("%s response: %v %+v", url, err, resp) // Connection refused, usually. if err != nil { + glog.Warningf("%s response: %v %+v", url, err, resp) return state.Stopped.String(), nil } if resp.StatusCode != http.StatusOK { + glog.Warningf("%s response: %v %+v", url, err, resp) return state.Error.String(), nil } return state.Running.String(), nil @@ -354,7 +337,6 @@ func addAddons(files *[]assets.CopyableFile, data interface{}) error { // client returns a Kubernetes client to use to speak to a kubeadm launched apiserver func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientset, error) { - // Catch case if WaitForPods was called with a stale ~/.kube/config config, err := kapi.ClientConfig(k.contextName) if err != nil { return nil, errors.Wrap(err, "client config") @@ -369,67 +351,104 @@ func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientse return kubernetes.NewForConfig(config) } -// WaitForPods blocks until pods specified in podsToWaitFor appear to be healthy. -func (k *Bootstrapper) WaitForPods(k8s config.KubernetesConfig, timeout time.Duration, podsToWaitFor []string) error { - // Do not wait for "k8s-app" pods in the case of CNI, as they are managed - // by a CNI plugin which is usually started after minikube has been brought - // up. Otherwise, minikube won't start, as "k8s-app" pods are not ready. - componentsOnly := k8s.NetworkPlugin == "cni" - out.T(out.WaitingPods, "Waiting for:") - - // Wait until the apiserver can answer queries properly. We don't care if the apiserver - // pod shows up as registered, but need the webserver for all subsequent queries. - - if shouldWaitForPod("apiserver", podsToWaitFor) { - out.String(" apiserver") - if err := k.waitForAPIServer(k8s); err != nil { - return errors.Wrap(err, "waiting for apiserver") +func (k *Bootstrapper) waitForAPIServerProcess(start time.Time, timeout time.Duration) error { + glog.Infof("waiting for apiserver process to appear ...") + err := wait.PollImmediate(time.Second*1, timeout, func() (bool, error) { + if time.Since(start) > timeout { + return false, fmt.Errorf("cluster wait timed out during process check") } + rr, ierr := k.c.RunCmd(exec.Command("sudo", "pgrep", "kube-apiserver")) + if ierr != nil { + glog.Warningf("pgrep apiserver: %v cmd: %s", ierr, rr.Command()) + return false, nil + } + return true, nil + }) + if err != nil { + return fmt.Errorf("apiserver process never appeared") } + glog.Infof("duration metric: took %s to wait for apiserver process to appear ...", time.Since(start)) + return nil +} + +func (k *Bootstrapper) waitForAPIServerHealthz(start time.Time, k8s config.KubernetesConfig, timeout time.Duration) error { + glog.Infof("waiting for apiserver healthz status ...") + hStart := time.Now() + healthz := func() (bool, error) { + if time.Since(start) > timeout { + return false, fmt.Errorf("cluster wait timed out during healthz check") + } + status, err := k.GetAPIServerStatus(net.ParseIP(k8s.NodeIP), k8s.NodePort) + if err != nil { + glog.Warningf("status: %v", err) + return false, nil + } + if status != "Running" { + return false, nil + } + return true, nil + } + + if err := wait.PollImmediate(kconst.APICallRetryInterval, kconst.DefaultControlPlaneTimeout, healthz); err != nil { + return fmt.Errorf("apiserver healthz never reported healthy") + } + glog.Infof("duration metric: took %s to wait for apiserver healthz status ...", time.Since(hStart)) + return nil +} + +func (k *Bootstrapper) waitForSystemPods(start time.Time, k8s config.KubernetesConfig, timeout time.Duration) error { + glog.Infof("waiting for kube-system pods to appear ...") + pStart := time.Now() client, err := k.client(k8s) if err != nil { return errors.Wrap(err, "client") } - for _, p := range PodsByLayer { - if componentsOnly && p.key != "component" { // skip component check if network plugin is cni - continue + podStart := time.Time{} + podList := func() (bool, error) { + if time.Since(start) > timeout { + return false, fmt.Errorf("cluster wait timed out during pod check") + } + // Wait for any system pod, as waiting for apiserver may block until etcd + pods, err := client.CoreV1().Pods("kube-system").List(meta.ListOptions{}) + if len(pods.Items) < 2 { + podStart = time.Time{} + return false, nil + } + if err != nil { + podStart = time.Time{} + return false, nil } - if !shouldWaitForPod(p.name, podsToWaitFor) { - continue + if podStart.IsZero() { + podStart = time.Now() } - out.String(" %s", p.name) - selector := labels.SelectorFromSet(labels.Set(map[string]string{p.key: p.value})) - if err := kapi.WaitForPodsWithLabelRunning(client, "kube-system", selector, timeout); err != nil { - return errors.Wrap(err, fmt.Sprintf("waiting for %s=%s", p.key, p.value)) + + glog.Infof("%d kube-system pods found since %s", len(pods.Items), podStart) + if time.Since(podStart) > 2*kconst.APICallRetryInterval { + glog.Infof("stability requirement met, returning") + return true, nil } + return false, nil + } + if err = wait.PollImmediate(kconst.APICallRetryInterval, kconst.DefaultControlPlaneTimeout, podList); err != nil { + return fmt.Errorf("apiserver never returned a pod list") } - out.Ln("") + glog.Infof("duration metric: took %s to wait for pod list to return data ...", time.Since(pStart)) return nil } -// shouldWaitForPod returns true if: -// 1. podsToWaitFor is nil -// 2. name is in podsToWaitFor -// 3. ALL_PODS is in podsToWaitFor -// else, return false -func shouldWaitForPod(name string, podsToWaitFor []string) bool { - if podsToWaitFor == nil { - return true - } - if len(podsToWaitFor) == 0 { - return false - } - for _, p := range podsToWaitFor { - if p == AllPods { - return true - } - if p == name { - return true - } +// WaitForCluster blocks until the cluster appears to be healthy +func (k *Bootstrapper) WaitForCluster(k8s config.KubernetesConfig, timeout time.Duration) error { + start := time.Now() + out.T(out.Waiting, "Waiting for cluster to come online ...") + if err := k.waitForAPIServerProcess(start, timeout); err != nil { + return err } - return false + if err := k.waitForAPIServerHealthz(start, k8s, timeout); err != nil { + return err + } + return k.waitForSystemPods(start, k8s, timeout) } // RestartCluster restarts the Kubernetes cluster configured by kubeadm @@ -472,11 +491,15 @@ func (k *Bootstrapper) RestartCluster(k8s config.KubernetesConfig) error { } } - if err := k.waitForAPIServer(k8s); err != nil { - return errors.Wrap(err, "waiting for apiserver") + // We must ensure that the apiserver is healthy before proceeding + if err := k.waitForAPIServerHealthz(time.Now(), k8s, kconst.DefaultControlPlaneTimeout); err != nil { + return errors.Wrap(err, "apiserver healthz") + } + if err := k.waitForSystemPods(time.Now(), k8s, kconst.DefaultControlPlaneTimeout); err != nil { + return errors.Wrap(err, "system pods") } - // restart the proxy and coredns + // Explicitly re-enable kubeadm addons (proxy, coredns) so that they will check for IP or configuration changes. if rr, err := k.c.RunCmd(exec.Command("/bin/bash", "-c", fmt.Sprintf("%s phase addon all --config %s", baseCmd, yamlConfigPath))); err != nil { return errors.Wrapf(err, fmt.Sprintf("addon phase cmd:%q", rr.Command())) } @@ -487,63 +510,6 @@ func (k *Bootstrapper) RestartCluster(k8s config.KubernetesConfig) error { return nil } -// waitForAPIServer waits for the apiserver to start up -func (k *Bootstrapper) waitForAPIServer(k8s config.KubernetesConfig) error { - start := time.Now() - defer func() { - glog.Infof("duration metric: took %s to wait for apiserver status ...", time.Since(start)) - }() - - glog.Infof("Waiting for apiserver process ...") - // To give a better error message, first check for process existence via ssh - // Needs minutes in case the image isn't cached (such as with v1.10.x) - err := wait.PollImmediate(time.Millisecond*300, time.Minute*3, func() (bool, error) { - rr, ierr := k.c.RunCmd(exec.Command("sudo", "pgrep", "kube-apiserver")) - if ierr != nil { - glog.Warningf("pgrep apiserver: %v cmd: %s", ierr, rr.Command()) - return false, nil - } - return true, nil - }) - if err != nil { - return fmt.Errorf("apiserver process never appeared") - } - - glog.Infof("Waiting for apiserver to port healthy status ...") - var client *kubernetes.Clientset - f := func() (bool, error) { - status, err := k.GetAPIServerStatus(net.ParseIP(k8s.NodeIP), k8s.NodePort) - glog.Infof("apiserver status: %s, err: %v", status, err) - if err != nil { - glog.Warningf("status: %v", err) - return false, nil - } - if status != "Running" { - return false, nil - } - // Make sure apiserver pod is retrievable - if client == nil { - // We only want to get the clientset once, because this line takes ~1 second to complete - client, err = k.client(k8s) - if err != nil { - glog.Warningf("get kubernetes client: %v", err) - return false, nil - } - } - - _, err = client.CoreV1().Pods("kube-system").Get("kube-apiserver-minikube", metav1.GetOptions{}) - if err != nil { - return false, nil - } - - return true, nil - // TODO: Check apiserver/kubelet logs for fatal errors so that users don't - // need to wait minutes to find out their flag didn't work. - } - err = wait.PollImmediate(kconst.APICallRetryInterval, 2*kconst.DefaultControlPlaneTimeout, f) - return err -} - // DeleteCluster removes the components that were started earlier func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error { version, err := parseKubernetesVersion(k8s.KubernetesVersion) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go index 4a19c4be358c..158ea3e81a3a 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm_test.go @@ -363,45 +363,3 @@ func TestGenerateConfig(t *testing.T) { } } } - -func TestShouldWaitForPod(t *testing.T) { - tests := []struct { - description string - pod string - podsToWaitFor []string - expected bool - }{ - { - description: "pods to wait for is nil", - pod: "apiserver", - expected: true, - }, { - description: "pods to wait for is empty", - pod: "apiserver", - podsToWaitFor: []string{}, - }, { - description: "pod is in podsToWaitFor", - pod: "apiserver", - podsToWaitFor: []string{"etcd", "apiserver"}, - expected: true, - }, { - description: "pod is not in podsToWaitFor", - pod: "apiserver", - podsToWaitFor: []string{"etcd", "gvisor"}, - }, { - description: "wait for all pods", - pod: "apiserver", - podsToWaitFor: []string{"ALL_PODS"}, - expected: true, - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - actual := shouldWaitForPod(test.pod, test.podsToWaitFor) - if actual != test.expected { - t.Fatalf("unexpected diff: got %t, expected %t", actual, test.expected) - } - }) - } -} diff --git a/pkg/minikube/out/out_test.go b/pkg/minikube/out/out_test.go index 79646c5de489..c364b581197f 100644 --- a/pkg/minikube/out/out_test.go +++ b/pkg/minikube/out/out_test.go @@ -46,7 +46,6 @@ func TestOutT(t *testing.T) { {Option, "Option", nil, " ▪ Option\n", " - Option\n"}, {WarningType, "Warning", nil, "⚠️ Warning\n", "! Warning\n"}, {FatalType, "Fatal: {{.error}}", V{"error": "ugh"}, "💣 Fatal: ugh\n", "X Fatal: ugh\n"}, - {WaitingPods, "wait", nil, "⌛ wait", "* wait"}, {Issue, "http://i/{{.number}}", V{"number": 10000}, " ▪ http://i/10000\n", " - http://i/10000\n"}, {Usage, "raw: {{.one}} {{.two}}", V{"one": "'%'", "two": "%d"}, "💡 raw: '%' %d\n", "* raw: '%' %d\n"}, {Running, "Installing Kubernetes version {{.version}} ...", V{"version": "v1.13"}, "🏃 ... v1.13 تثبيت Kubernetes الإصدار\n", "* ... v1.13 تثبيت Kubernetes الإصدار\n"}, diff --git a/pkg/minikube/out/style.go b/pkg/minikube/out/style.go index 0af52ed464d1..b14c9d5883e2 100644 --- a/pkg/minikube/out/style.go +++ b/pkg/minikube/out/style.go @@ -65,7 +65,6 @@ var styles = map[StyleEnum]style{ Stopped: {Prefix: "🛑 "}, WarningType: {Prefix: "⚠️ ", LowPrefix: lowWarning}, Waiting: {Prefix: "⌛ "}, - WaitingPods: {Prefix: "⌛ ", OmitNewline: true}, Usage: {Prefix: "💡 "}, Launch: {Prefix: "🚀 "}, Sad: {Prefix: "😿 "}, diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index a575e96eb57b..b3ea1f10689f 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -107,7 +107,7 @@ func validateIngressAddon(ctx context.Context, t *testing.T, profile string) { t.Errorf("%s failed: %v", rr.Args, err) } - if _, err := PodWait(ctx, t, profile, "default", "run=nginx", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "run=nginx", 4*time.Minute); err != nil { t.Fatalf("wait: %v", err) } if err := kapi.WaitForService(client, "default", "nginx", true, time.Millisecond*500, time.Minute*10); err != nil { diff --git a/test/integration/fn_mount_cmd.go b/test/integration/fn_mount_cmd.go index 277b8951423d..7888971be886 100644 --- a/test/integration/fn_mount_cmd.go +++ b/test/integration/fn_mount_cmd.go @@ -139,7 +139,7 @@ func validateMountCmd(ctx context.Context, t *testing.T, profile string) { t.Fatalf("%s failed: %v", rr.Args, err) } - if _, err := PodWait(ctx, t, profile, "default", "integration-test=busybox-mount", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "integration-test=busybox-mount", 4*time.Minute); err != nil { t.Fatalf("wait: %v", err) } diff --git a/test/integration/fn_pvc.go b/test/integration/fn_pvc.go index 54e1e8e93eb4..3110d455009d 100644 --- a/test/integration/fn_pvc.go +++ b/test/integration/fn_pvc.go @@ -37,7 +37,7 @@ func validatePersistentVolumeClaim(ctx context.Context, t *testing.T, profile st ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) defer cancel() - if _, err := PodWait(ctx, t, profile, "kube-system", "integration-test=storage-provisioner", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "kube-system", "integration-test=storage-provisioner", 4*time.Minute); err != nil { t.Fatalf("wait: %v", err) } @@ -83,7 +83,7 @@ func validatePersistentVolumeClaim(ctx context.Context, t *testing.T, profile st return fmt.Errorf("testpvc phase = %q, want %q (msg=%+v)", pvc.Status.Phase, "Bound", pvc) } - if err := retry.Expo(checkStoragePhase, 2*time.Second, 2*time.Minute); err != nil { + if err := retry.Expo(checkStoragePhase, 2*time.Second, 4*time.Minute); err != nil { t.Fatalf("PV Creation failed with error: %v", err) } } diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index b61ed0a70753..3a1a234e2424 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -114,7 +114,7 @@ func validateStartWithProxy(ctx context.Context, t *testing.T, profile string) { } // Use more memory so that we may reliably fit MySQL and nginx - startArgs := append([]string{"start", "-p", profile, "--wait=false", "--memory", "2500MB"}, StartArgs()...) + startArgs := append([]string{"start", "-p", profile, "--wait=true", "--memory", "2500MB"}, StartArgs()...) c := exec.CommandContext(ctx, Target(), startArgs...) env := os.Environ() env = append(env, fmt.Sprintf("HTTP_PROXY=%s", srv.Addr)) @@ -149,13 +149,15 @@ func validateKubeContext(ctx context.Context, t *testing.T, profile string) { // validateKubectlGetPods asserts that `kubectl get pod -A` returns non-zero content func validateKubectlGetPods(ctx context.Context, t *testing.T, profile string) { - rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "get", "pod", "-A")) + rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "get", "po", "-A")) if err != nil { t.Errorf("%s failed: %v", rr.Args, err) } - podName := "kube-apiserver-minikube" - if !strings.Contains(rr.Stdout.String(), podName) { - t.Errorf("%s is not up in running, got: %s\n", podName, rr.Stdout.String()) + if rr.Stderr.String() != "" { + t.Errorf("%s: got unexpected stderr: %s", rr.Command(), rr.Stderr) + } + if !strings.Contains(rr.Stdout.String(), "kube-system") { + t.Errorf("%s = %q, want *kube-system*", rr.Command(), rr.Stdout) } } diff --git a/test/integration/gvisor_addon_test.go b/test/integration/gvisor_addon_test.go index f8ffb4d2c0ce..172802ceea95 100644 --- a/test/integration/gvisor_addon_test.go +++ b/test/integration/gvisor_addon_test.go @@ -75,7 +75,7 @@ func TestGvisorAddon(t *testing.T) { } }() - if _, err := PodWait(ctx, t, profile, "kube-system", "kubernetes.io/minikube-addons=gvisor", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "kube-system", "kubernetes.io/minikube-addons=gvisor", 4*time.Minute); err != nil { t.Fatalf("waiting for gvisor controller to be up: %v", err) } @@ -90,10 +90,10 @@ func TestGvisorAddon(t *testing.T) { t.Fatalf("%s failed: %v", rr.Args, err) } - if _, err := PodWait(ctx, t, profile, "default", "run=nginx,untrusted=true", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "run=nginx,untrusted=true", 4*time.Minute); err != nil { t.Errorf("nginx: %v", err) } - if _, err := PodWait(ctx, t, profile, "default", "run=nginx,runtime=gvisor", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "run=nginx,runtime=gvisor", 4*time.Minute); err != nil { t.Errorf("nginx: %v", err) } @@ -107,13 +107,13 @@ func TestGvisorAddon(t *testing.T) { if err != nil { t.Fatalf("%s failed: %v", rr.Args, err) } - if _, err := PodWait(ctx, t, profile, "kube-system", "kubernetes.io/minikube-addons=gvisor", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "kube-system", "kubernetes.io/minikube-addons=gvisor", 4*time.Minute); err != nil { t.Errorf("waiting for gvisor controller to be up: %v", err) } - if _, err := PodWait(ctx, t, profile, "default", "run=nginx,untrusted=true", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "run=nginx,untrusted=true", 4*time.Minute); err != nil { t.Errorf("nginx: %v", err) } - if _, err := PodWait(ctx, t, profile, "default", "run=nginx,runtime=gvisor", 2*time.Minute); err != nil { + if _, err := PodWait(ctx, t, profile, "default", "run=nginx,runtime=gvisor", 4*time.Minute); err != nil { t.Errorf("nginx: %v", err) } }