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

[macOS] Removing machines and uninstalling podman doesn't clean up fully #11393

Closed
Jarvvski opened this issue Sep 1, 2021 · 5 comments · Fixed by #11802
Closed

[macOS] Removing machines and uninstalling podman doesn't clean up fully #11393

Jarvvski opened this issue Sep 1, 2021 · 5 comments · Fixed by #11802
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Jarvvski
Copy link

Jarvvski commented Sep 1, 2021

/kind bug

Description

It seems like some files are left over when removing machines, uninstalling podman and then reinstalling and initalizing a new machine

Steps to reproduce the issue:

podman machine rm podman-machine-default
brew uninstall podman
brew install podman
podman machine init
podman machine start

Describe the results you received:

❯ podman machine start
ERRO[0000] "/var/folders/0j/d55jkwxx68j8j1rqcx9zwmmc0000gp/T/podman/qemu_podman-machine-default.sock" already exists
panic: interface conversion: net.Conn is nil, not *net.UnixConn

goroutine 1 [running]:
github.com/containers/podman/v3/pkg/machine/qemu.(*MachineVM).Start(0xc000666000, 0x1d70aaa, 0x16, 0xc000666000, 0x0)
	pkg/machine/qemu/machine.go:277 +0xb46
github.com/containers/podman/v3/cmd/podman/machine.start(0x2571680, 0x25bfb80, 0x0, 0x0, 0x0, 0x0)
	cmd/podman/machine/start.go:62 +0x2f5
github.com/spf13/cobra.(*Command).execute(0x2571680, 0xc0001181a0, 0x0, 0x0, 0x2571680, 0xc0001181a0)
	vendor/github.com/spf13/cobra/command.go:856 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0x257c300, 0xc000138008, 0x1bfa5a0, 0x25bfb80)
	vendor/github.com/spf13/cobra/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	vendor/github.com/spf13/cobra/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	vendor/github.com/spf13/cobra/command.go:895
main.Execute()
	cmd/podman/root.go:90 +0xe7
main.main()
	cmd/podman/main.go:39 +0x92

Describe the results you expected:

Machine to start successfully

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

❯ podman --version
podman version 3.3.0

❯ podman version
Error: failed to create sshClient: Connection to bastion host (ssh://core@localhost:49828/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:49828: connect: connection refused

Output of podman info --debug:

Error: failed to create sshClient: Connection to bastion host (ssh://core@localhost:49828/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:49828: connect: connection refused

Package info (e.g. output of rpm -q podman or apt list podman):

❯ brew info podman
podman: stable 3.3.0 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/usr/local/Cellar/podman/3.3.0 (170 files, 40.3MB) *
  Poured from bottle on 2021-09-01 at 18:14:12
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go ✘, go-md2man ✘
Required: qemu ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Analytics
install: 3,262 (30 days), 11,211 (90 days), 36,370 (365 days)
install-on-request: 3,264 (30 days), 11,202 (90 days), 35,921 (365 days)
build-error: 0 (30 days)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 1, 2021
@Jarvvski
Copy link
Author

Jarvvski commented Sep 1, 2021

Seems to be fine if I manually remove the left over socket file

❯ rm /var/folders/0j/d55jkwxx68j8j1rqcx9zwmmc0000gp/T/podman/qemu_podman-machine-default.sock

❯ podman machine start
INFO[0000] waiting for clients...
INFO[0000] listening tcp://0.0.0.0:7777
INFO[0000] new connection from  to /var/folders/0j/d55jkwxx68j8j1rqcx9zwmmc0000gp/T/podman/qemu_podman-machine-default.sock
Waiting for VM ...
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]

@mheon
Copy link
Member

mheon commented Sep 1, 2021

@baude @ashley-cui PTAL

@Jarvvski
Copy link
Author

Jarvvski commented Sep 1, 2021

Now I can correctly run the podman version commands too

❯ podman version
Client:
Version:      3.3.0
API Version:  3.3.0
Go Version:   go1.16.6
Built:        Fri Aug 20 18:47:23 2021
OS/Arch:      darwin/amd64

Server:
Version:      3.3.0
API Version:  3.3.0
Go Version:   go1.16.6
Built:        Fri Aug 20 20:36:14 2021
OS/Arch:      linux/amd64

@wzzrd
Copy link

wzzrd commented Sep 7, 2021

Running into same issue. Removing lingering socket file does allow to start a new VM, but I still end up with the connection refused error on the bastion host.

@flouthoc
Copy link
Collaborator

@Jarvvski following should close this

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants