containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.33k stars 2.38k forks source link

Machine init does not delete partially downloaded files when aborting #23143

Closed taoyouh closed 3 months ago

taoyouh commented 3 months ago

Issue Description

If I press ctrl + C when running podman machine init, the partially downloaded tarballs will not be deleted. The next runs of podman machine init will always fail with "Error: unexpected EOF" until I manually remove the files in C:\Users\xxx\.local\share\containers\podman\machine.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Run podman machine init and press ctrl+C during the download progress
  2. Run podman machine init again

Describe the results you received

The command fails saying:

Extracting compressed file: podman-machine-default-amd64: done
Extracting compressed file: podman-machine-default-amd64: done
Error: unexpected EOF

Describe the results you expected

The WSL rootfs will be downloaded again.

podman info output

OS: windows/amd64
provider: wsl
version: 5.1.1

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine sta
rt` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v5.1.1/libpod/_ping": dial unix /run/podman/podman.sock: connect: A socket operation encountered a dead networ
k.

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

taoyouh commented 3 months ago

This looks similar to #22927 except that's from Podman Desktop and this one is from CLI.

Luap99 commented 3 months ago

Duplicate of #22927

Podman Desktop just calls the podman cli command so it is the same issue