-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Creating a podman machine with user mode networking leaves a stranded wsl machine #25302
Comments
I think you are missing a step? somewhere between 1-3 there should be a start? Or at least ... no step 3? |
Yeah, sorry, I forgot to add the start step, it got automatically started for me through Podman Desktop when I checked that the machine was found on the app and completely missed it |
I was able to reproduce the problem. The curious thing is that both machines are started/stopped with |
i spoke with @n1hility about this yesterday; there is intent on this behavior. we did talk about whether the behavior can change and this was my take away:
So there is some risk to changing this behavior but I think if the consensus is that we should do this, then that is OK. One idea would be to remove it but have something like a --preserve option that would not remove the usermode instance. Maybe we are overthinking and we should just do it and see who compains? |
I don't have the data to prove this, but I think that the number of users with an unexpected and unused wsl machine in their devices should be way bigger than the number of users that "recycle" said wsl machine. And if a user wants to have a standalone wsl machine, they can create it explicitly for that purpose outside of the podman context, right? |
I agree with @danivilla9; recycling user mode machine seems unlikely. That said, the PS > podman machine rm
The following files will be deleted:
(...)
+ Re-run this command with the `--preserve` flag to keep the `podman-net-usermode` machine.
Are you sure you want to continue? [y/N] |
I don't mind mind deleting it but it MUST be race free. How are you going to deal with the fact the one machine rm commands remove it while another machine is created with user mode networking or uses podman machine set --user-mode-networking? AFAIK we do not hold any global locks between machine create and remove so this requires a fair amount of locking to actually work reliably without introducing plenty of race conditions. |
Issue Description
When I create a podman machine with user mode networking enabled, it creates a wsl machine alongside that persists after deleting the original podman machine. Is this expected behavior? Because it has proved to be a problem in podman desktop.
Steps to reproduce the issue
Steps to reproduce the issue
podman machine init --user-mode-networking
wsl --list
(podman-net-usermode
andpodman-machine-default
are there)podman machine stop podman-machine-default
podman machine rm -f podman-machine-default
wsl --list
(podman-net-usermode
is still there)Describe the results you received
podman-net-usermode
wsl machine persists after deleting the podman machine that needed itDescribe the results you expected
podman-net-usermode
is deleted alongside the podman machine that needed itpodman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: