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

2.0.0-dev is not getting accepted as valid version #8560

Closed
avsej opened this issue Jun 25, 2020 · 2 comments Β· Fixed by #8575
Closed

2.0.0-dev is not getting accepted as valid version #8560

avsej opened this issue Jun 25, 2020 · 2 comments Β· Fixed by #8575
Labels
co/podman-driver podman driver issues kind/bug Categorizes issue or PR as related to a bug. os/linux priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@avsej
Copy link

avsej commented Jun 25, 2020

$ minikube start --driver=podman --container-runtime=cri-o
πŸ˜„  minikube v1.12.0-beta.0 on Fedora rawhide
✨  Using the podman (experimental) driver based on user configuration

❗  'podman' driver reported an issue: Invalid character(s) found in prerelease "dev\n"
πŸ’‘  Suggestion: Cant verify minimum required version for podman . See podman website for installation guide.
πŸ“˜  Documentation: https://podman.io/getting-started/installation.html

πŸ’£  Failed to validate 'podman' driver
$ podman version
Version:      2.0.0-dev
API Version:  1
Go Version:   go1.14.3
Git Commit:   9980991f9be8f5fbb4e87caf5ac34ce2575a232c
Built:        Thu Jun 18 03:00:00 2020
OS/Arch:      linux/amd64

cmd := exec.CommandContext(ctx, oci.Podman, "version", "--format", "{{.Server.Version}}")
// Run with sudo on linux (local), otherwise podman-remote (as podman)
if runtime.GOOS == "linux" {
cmd = exec.CommandContext(ctx, "sudo", "-k", "-n", oci.Podman, "version", "--format", "{{.Version}}")
cmd.Env = append(os.Environ(), "LANG=C", "LC_ALL=C") // sudo is localized
}
o, err := cmd.Output()
output := string(o)
if err == nil {
glog.Infof("podman version: %s", output)
v, err := semver.Make(output)
if err != nil {
return registry.State{Error: err, Installed: true, Healthy: false, Fix: "Cant verify minimum required version for podman . See podman website for installation guide.", Doc: "https://podman.io/getting-started/installation.html"}

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. co/podman-driver podman driver issues os/linux labels Jun 26, 2020
@afbjorklund
Copy link
Collaborator

afbjorklund commented Jun 26, 2020

I suppose this should be made to parse eventually, workaround meanwhile is to use a released version (like 2.0.0)

i.e. strip any trailing "-dev" string before feeding to semver

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jun 26, 2020

Actually it was fine with the "-dev", it was the "\n" that was the problem here. Copied the code from docker, which uses --format.

@afbjorklund afbjorklund added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/podman-driver podman driver issues kind/bug Categorizes issue or PR as related to a bug. os/linux priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants