Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libnetwork/rootlessnetns: fix netns leak on errors
When the netns program fails to configure the netns or we fail for any other reason during the setup we must make sure to remove the netns mount again. Without it the next command sees the existing mount and thinks the netns was setup correctly but than later fails during the custom resolv.conf mount because the resolv.conf source file was never created. For future we should consider adding checks due ensure pasta/slirp4netns is still running when we access the netns to make it more fault tolerant. The reason this is a common problem is that on boot pasta can likely fail if it was started before the networking was fully configured (i.e. no default route). Fixes containers/podman#22168 Signed-off-by: Paul Holzinger <[email protected]>
- Loading branch information