diff --git a/cmd/minikube/cmd/config/validations.go b/cmd/minikube/cmd/config/validations.go index fe088cd7243c..3c1b28a64136 100644 --- a/cmd/minikube/cmd/config/validations.go +++ b/cmd/minikube/cmd/config/validations.go @@ -136,7 +136,11 @@ func IsContainerdRuntime(_, _ string) error { if config.KubernetesConfig.ContainerRuntime != constants.ContainerdRuntime { return fmt.Errorf(`This addon can only be enabled with the containerd runtime backend. -To enable this backend, please start minikube again with the following flags: +To enable this backend, please first stop minikube with: + +minikube stop + +and then start minikube again with the following flags: minikube start --container-runtime=containerd --docker-opt containerd=/var/run/containerd/containerd.sock --network-plugin=cni`) } diff --git a/pkg/gvisor/disable.go b/pkg/gvisor/disable.go index 881a4eca47ec..4c00bbaea0c9 100644 --- a/pkg/gvisor/disable.go +++ b/pkg/gvisor/disable.go @@ -32,7 +32,7 @@ func Disable() error { if err := os.Remove(filepath.Join(nodeDir, constants.ContainerdConfigTomlPath)); err != nil { return errors.Wrapf(err, "removing %s", constants.ContainerdConfigTomlPath) } - log.Printf("Storing default config.toml at %s", constants.ContainerdConfigTomlPath) + log.Printf("Restoring default config.toml at %s", constants.ContainerdConfigTomlPath) if err := mcnutils.CopyFile(filepath.Join(nodeDir, constants.StoredContainerdConfigTomlPath), filepath.Join(nodeDir, constants.ContainerdConfigTomlPath)); err != nil { return errors.Wrap(err, "reverting back to default config.toml") } diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index f9e1e159dc54..3830f6a6b6e9 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -22,6 +22,7 @@ import ( "bufio" "fmt" "io/ioutil" + "log" "net" "net/http" "net/url" @@ -191,11 +192,13 @@ func testGvisor(t *testing.T) { t.Log("enabling gvisor addon") minikubeRunner.RunCommand("addons enable gvisor", true) t.Log("waiting for gvisor controller to come up") - if err := util.WaitForGvisorControllerRunning(); err != nil { + if err := util.WaitForGvisorControllerRunning(t); err != nil { // Print out logs from controller - if _, err := kubectlRunner.RunCommand([]string{"get", "pods", "--all-namespaces"}); err != nil { + out, err := kubectlRunner.RunCommand([]string{"get", "pods", "--all-namespaces"}) + if err != nil { t.Errorf("error getting all pods %v", err) } + log.Print(string(out)) if _, err := kubectlRunner.RunCommand([]string{"logs", "gvisor", "-n", "kube-system"}); err != nil { t.Errorf("error getting gvisor logs: %v", err) } diff --git a/test/integration/util/util.go b/test/integration/util/util.go index db13af91e7fa..a54e96aee892 100644 --- a/test/integration/util/util.go +++ b/test/integration/util/util.go @@ -127,7 +127,7 @@ func (m *MinikubeRunner) Start() { switch r := m.Runtime; r { case constants.ContainerdRuntime: // TODO: priyawadhwa@ remove iso url once updated iso is being used in integration tests - containerdFlags := "--container-runtime=containerd --network-plugin=cni --docker-opt containerd=/var/run/containerd/containerd.sock --iso-url=https://storage.googleapis.com/minikube-iso/minikube.iso" + containerdFlags := "--container-runtime=containerd --network-plugin=cni --docker-opt containerd=/var/run/containerd/containerd.sock --iso-url=https://storage.googleapis.com/gvisor-preview/minikube.iso" m.RunCommand(fmt.Sprintf("start %s %s %s", m.StartArgs, m.Args, containerdFlags), true) default: m.RunCommand(fmt.Sprintf("start %s %s", m.StartArgs, m.Args), true) @@ -300,7 +300,7 @@ func WaitForIngressDefaultBackendRunning(t *testing.T) error { } // WaitForGvisorControllerRunning waits for the gvisor controller pod to be running -func WaitForGvisorControllerRunning() error { +func WaitForGvisorControllerRunning(t *testing.T) error { client, err := commonutil.GetClient() if err != nil { return errors.Wrap(err, "getting kubernetes client") @@ -341,7 +341,7 @@ func WaitForUntrustedNginxRunning() error { return nil } -// WaitForFailedCreatePodSandBoxEvent waits for a FailedCreatePodSandBox event to show appear +// WaitForFailedCreatePodSandBoxEvent waits for a FailedCreatePodSandBox event to appear func WaitForFailedCreatePodSandBoxEvent() error { client, err := commonutil.GetClient() if err != nil {