From 62683c9b42b7410a3fb6da81a8306a43ef8d997b Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Tue, 21 Jul 2020 02:39:46 +0100 Subject: [PATCH] Exit with error on podman2 drivers --- pkg/minikube/registry/drvs/podman/podman.go | 15 ++++++++++++++- site/content/en/docs/drivers/podman.md | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/registry/drvs/podman/podman.go b/pkg/minikube/registry/drvs/podman/podman.go index c5fa66da90..3deb5299e1 100644 --- a/pkg/minikube/registry/drvs/podman/podman.go +++ b/pkg/minikube/registry/drvs/podman/podman.go @@ -37,9 +37,12 @@ import ( "k8s.io/minikube/pkg/minikube/registry" ) -// minReqPodmanVer is required the mininum version of podman to be installed for podman driver. +// minReqPodmanVer is required the minimum version of podman to be installed for podman driver. var minReqPodmanVer = semver.Version{Major: 1, Minor: 7, Patch: 0} +// podmanVerTwo is required to exit with an error when podman2 driver is currently installed because it is not supported yet. +var podmanVerTwo = semver.Version{Major: 2, Minor: 0, Patch: 0} + func init() { priority := registry.Experimental // Staged rollout for default: @@ -107,6 +110,16 @@ func status() registry.State { glog.Warningf("Warning ! minimum required version for podman is %s. your version is %q. minikube might not work. use at your own risk. To install latest version please see https://podman.io/getting-started/installation.html ", minReqPodmanVer.String(), v.String()) } + if v.GTE(podmanVerTwo) { + return registry.State{ + Error: fmt.Errorf("Podman2 is not supported yet"), + Installed: true, + Healthy: false, + Fix: "Install a compatable Podman driver", + Doc: "https://github.com/containers/podman/releases/v1.9.3", + } + } + return registry.State{Installed: true, Healthy: true} } diff --git a/site/content/en/docs/drivers/podman.md b/site/content/en/docs/drivers/podman.md index d1e8271306..17c704dbb3 100644 --- a/site/content/en/docs/drivers/podman.md +++ b/site/content/en/docs/drivers/podman.md @@ -24,6 +24,7 @@ The podman driver is an alternative container runtime to the [Docker]({{< ref "/ ## Known Issues - Podman driver is not supported on non-amd64 architectures such as arm yet. For non-amd64 archs please use [other drivers]({{< ref "/docs/drivers/_index.md" >}}) +- Podman2 driver is not supported yet. - Podman requirements passwordless running of sudo. If you run into an error about sudo, do the following: ```shell