Skip to content

machine/wsl: unregister shared net-usermode dist on machine rm - #29533

Open
Srujansa wants to merge 1 commit into
podman-container-tools:mainfrom
Srujansa:fix-usermode-dist-leak
Open

machine/wsl: unregister shared net-usermode dist on machine rm#29533
Srujansa wants to merge 1 commit into
podman-container-tools:mainfrom
Srujansa:fix-usermode-dist-leak

Conversation

@Srujansa

Copy link
Copy Markdown

Fixes #29480

The podman-net-usermode WSL distribution is shared across all
machines using --user-mode-networking, but podman machine rm
never unregistered it — only the machine's own WSL distro was
removed, leaving podman-net-usermode behind indefinitely.

This adds a check in WSLStubber.Remove(): if the removed machine
had user-mode networking enabled, it now looks at the other
configured machines and only unregisters podman-net-usermode if
none of them still need it.

Tested manually on Windows:

  • single machine with --user-mode-networking: podman machine rm
    now also removes podman-net-usermode from wsl --list
  • two machines both using --user-mode-networking: removing one
    leaves podman-net-usermode intact for the other

Signed-off-by: Srujansa <srujan3255@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User mode networking WSL instance is never removed

1 participant