Closed cbr7 closed 4 months ago
@cbr7 could you add the image you're using / pulling /running
@benoitf I was able to reproduce the issue with the image ghcr.io/linuxcontainers/alpine:latest
.
$ podman machine start
$ podman run --rm -it fedora
another terminal:
podman machine stop
then it's delayed by 1mn30
From some internal discussion:
For podman machine
possibly investigate reducing the 90s systemd timeout as well? When I want the VM down, I want it down quickly, and it's unlikely that containers in a machine VM are production-critical - early SIGKILL shouldn't hurt that much.
A friendly reminder that this issue had no activity for 30 days.
Any update on the issue?
Yes for 2, https://github.com/containers/podman/pull/23064 fixes the long stop systemd timeout issue when the container does not exit on sigterm.
For 1 I can open a PR to increase the timeout. I guess at some point (maybe after 90s) we should terminate the VM forcefully and print a warning. I don't think machine stop should ever return an error if the shutdown takes to long.
Feel free to test if https://github.com/containers/podman/pull/23097 works for you
@Luap99 Thanks! @cbr7 Can you take a look, please?
@odockal sure
Issue Description
On version 5.0.2 on macOS it seems that it's not possible to correctly stop the podman machine if it has at least an active container running.
Steps to reproduce the issue
Steps to reproduce the issue
podman machine list
but runningpodman images
throws the following error: "Cannot connect to Podman. Please verify your connection to the Linux system usingpodman system connection list
, or trypodman machine init
andpodman machine start
to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: ssh: handshake failed: read tcp 127.0.0.1:58659->127.0.0.1:53782: read: connection reset by peer"Describe the results you received
Error thrown when stopping podman machine
Describe the results you expected
Podman machine successfully stops
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman version Client: Podman Engine Version: 5.0.2 API Version: 5.0.2 Go Version: go1.22.2 Git Commit: 3304dd95b8978a8346b96b7d43134990609b3b29 Built: Wed Apr 17 21:13:18 2024 OS/Arch: darwin/arm64
Server: Podman Engine Version: 5.0.2 API Version: 5.0.2 Go Version: go1.21.9 Built: Wed Apr 17 02:00:00 2024 OS/Arch: linux/arm64 vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % clear vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman version Client: Podman Engine Version: 5.0.2 API Version: 5.0.2 Go Version: go1.22.2 Git Commit: 3304dd95b8978a8346b96b7d43134990609b3b29 Built: Wed Apr 17 21:13:18 2024 OS/Arch: darwin/arm64
Server: Podman Engine Version: 5.0.2 API Version: 5.0.2 Go Version: go1.21.9 Built: Wed Apr 17 02:00:00 2024 OS/Arch: linux/arm64 vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman info host: arch: arm64 buildahVersion: 1.35.3 cgroupControllers:
Additional information
Seems to happen consistently on macOS, but was not able to reproduce on Windows 11.