kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.14k stars 4.86k forks source link

Bump minimum supported podman version #19232

Closed medyagh closed 2 weeks ago

medyagh commented 1 month ago

Podman has been failing on github action for a long time lets take a stab at it here are the info

podman version

--------------------------
Version:      3.4.2
API Version:  3.4.2
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd[64](https://github.com/kubernetes/minikube/actions/runs/9881717147/job/27293245071?pr=19229#step:3:65)
--------------------------

Logs (example https://github.com/kubernetes/minikube/actions/runs/9881717147/job/27293245071?pr=19229)

First error is in downloading image that refers to "https://github.com/kubernetes/minikube/issues/8426" I need help someone to look up that issue and see if we can implement that now or it still cant be implemented yet.

99.99% 12.47 Mi    > gcr.io/k8s-minikube/kicbase...:  482.89 MiB / 482.89 MiB  100.00% 3.53 MiE0710 02:35:51.728804    5824 
cache.go:189] Error downloading kic artifacts:  not yet implemented, see issue #8426

and creating container fails, there seem to be many ppl with same logs https://github.com/kubernetes/minikube/issues/18759

WARNING: The same type, major and minor should not be used for multiple devices.
Error: OCI runtime error: chmod `run/shm`: Operation not supported
50 Mi    > gcr.io/k8s-minikube/kicbase...:  457.92 MiB / 482.89 MiB  94.83% 12.50 Mi    > gcr.io/k8s-minikube/kicbase...:  461.05 MiB / 482.89 MiB  95.48% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  463.02 MiB / 482.89 MiB  95.88% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  465.35 MiB / 482.89 MiB  96.37% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  468.55 MiB / 482.89 MiB  97.03% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  470.88 MiB / 482.89 MiB  97.51% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  472.86 MiB / 482.89 MiB  97.92% 12.56 Mi    > gcr.io/k8s-minikube/kicbase...:  476.38 MiB / 482.89 MiB  98.65% 12.59 Mi    > gcr.io/k8s-minikube/kicbase...:  478.92 MiB / 482.89 MiB  99.18% 12.59 Mi    > gcr.io/k8s-minikube/kicbase...:  480.85 MiB / 482.89 MiB  99.58% 12.59 Mi    > gcr.io/k8s-minikube/kicbase...:  482.83 MiB / 482.89 MiB  99.99% 12.47 Mi    > gcr.io/k8s-minikube/kicbase...:  482.89 MiB / 482.89 MiB  100.00% 3.53 MiE0710 02:35:51.728804    5824 cache.go:189] Error downloading kic arti
facts:  not yet implemented, see issue #8426
! Local proxy ignored: not passing HTTPS_PROXY=127.0.0.1:8080 to docker env.
! StartHost failed, but will try again: creating host: create: creating: create kic node: create container: 

sudo -n podman run --cgroup-manager cgroupfs -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname functional-087356 --name functional-087356 --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=functional-087356 --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=functional-087356 --network functional-087356 --ip 192.168.49.2 --volume functional-087356:/var:exec --memory=4000mb --cpus=2 -e container=podman --expose 8441 --publish=127.0.0.1::8441 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 --publish=127.0.0.1::5000 --publish=127.0.0.1::32443 gcr.io/k8s-minikube/kicbase-builds:v0.0.44-1720534588-19199: exit status 126
stdout:
stderr:
WARNING: The same type, major and minor should not be used for multiple devices.
Error: OCI runtime error: chmod `run/shm`: Operation not supported
! Local proxy ignored: not passing HTTPS_PROXY=127.0.0.1:8080 to docker env.
* Failed to start podman container. Running "minikube delete -p functional-087356" may fix it: creating host: create: creating: setting up container node: creating volume for functional-087356 container: sudo -n podman volume create functional-087356 --label name.minikube.sigs.k8s.io=functional-087356 --label created_by.minikube.sigs.k8s.io=true: exit status 125
stdout:
stderr:
Error: volume with name functional-087356 already exists: volume already exists
X Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: creating host: create: creating: setting up container node: creating volume for functional-087356 container: sudo -n podman volume create functional-087356 --label name.minikube.sigs.k8s.io=functional-087356 --label created_by.minikube.sigs.k8s.io=true: exit status 125
stdout:
stderr:
Error: volume with name functional-087356 already exists: volume already exists
* 
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                             │
│    * If the above advice does not help, please let us know:                                 │
│      https://github.com/kubernetes/minikube/issues/new/choose                               │
│                                                                                             │
│    * Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    │
│                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯

also it worth trying to use --force-system in github action to see if that fixes it

xcarolan commented 1 month ago

/assign

medyagh commented 1 month ago

@xcarolan if it helps here is a PR I made on the setup-minikube github action https://github.com/medyagh/setup-minikube/pull/496

here is a run on ubuntu 22.04 https://github.com/medyagh/setup-minikube/actions/runs/9943952476/job/27468892104?pr=496 which installs podman 3.4.4

and here is a run on ubuntu 24.04 there it installs 4.9.3

Client:       Podman Engine
Version:      4.9.3
API Version:  4.9.3

and interestingly it works ! https://github.com/medyagh/setup-minikube/actions/runs/9943998728

so the issue is we need make set a mininum version supported by minkube to be podman 4 (or [possibily 4.9) so when the user runs it with Older podman minikube should quit nicely

here is the part of the code https://github.com/medyagh/minikube/blob/8585f4395093245ed0b8510269cc192bf948bedd/pkg/minikube/registry/drvs/podman/podman.go#L44

xcarolan commented 1 month ago

This is awesome thanks!

Samantha

Sent with Proton Mail secure email.

On Monday, July 15th, 2024 at 1:42 PM, Medya Ghazizadeh @.***> wrote:

@.***(https://github.com/xcarolan) if it helps here is a PR I made on the setup-minikube github action medyagh/setup-minikube#496

here is a run on ubuntu 22.04 https://github.com/medyagh/setup-minikube/actions/runs/9943952476/job/27468892104?pr=496 which installs podman 3

and here is a run on ubuntu 24.04 there it installs Client: Podman Engine Version: 4.9.3 API Version: 4.9.3

and interestingly it works ! https://github.com/medyagh/setup-minikube/actions/runs/9943998728

so the issue is we need make set a mininum version supported by minkube to be podman 4 (or [possibily 4.9) so when the user runs it with Older podman minikube should quit nicely

here is the part of the code https://github.com/medyagh/minikube/blob/8585f4395093245ed0b8510269cc192bf948bedd/pkg/minikube/registry/drvs/podman/podman.go#L44

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

prezha commented 1 month ago

i think @medyagh fixed this in #19256, just it wasn't prefixed with "fixes" did not close this issue automatically

afbjorklund commented 1 month ago

It just bumped the CI version of OS, it did not increase the minimum supported Podman version.

Some versions of Ubuntu and Podman still have older versions of 4.x, though (upstream only does 5.x)

prezha commented 1 month ago

thanks Anders, sorry for the confusion - i'll reopen the issue then

afbjorklund commented 1 month ago

Debian uses 4.3.1, so one arbitrary minimum version would be 4.2

// minReqPodmanVer is required the minimum version of podman to be installed for podman driver.
var minReqPodmanVer = semver.Version{Major: 2, Minor: 1, Patch: 0}

Or drop support for Debian 12 and Ubuntu 23.10, another option?

xcarolan commented 1 month ago

i actually have a patch for this - I'm just verifying some additional changes.

afbjorklund commented 1 month ago

Whatever the new version is, it should be verified that it actually works...

xcarolan commented 3 weeks ago

The change I have is specifically for the Podman driver:

`// minReqPodmanVer is required the minimum version of podman to be installed for podman driver. var minReqPodmanVer = semver.Version{Major: 4, Minor: 9, Patch: 0}

Along this i'm trying to understand the history behind: if cc.Driver == driver.Podman { // return fmt.Errorf("not yet implemented, see issue #8426")

afbjorklund commented 3 weeks ago

There were some hardcoded calls to docker, in the image loading code - needs a podman version.

download.CacheToDaemon

Here was the upstream issue, possibly you could use the Docker API also for podman: cri-o and containerd

xcarolan commented 3 weeks ago

Thanks!