In case of rootless containers, the network flow is as follows:
- Rootless podman passes an empty path for the network namespace in the OCI config.json
- OCI runtime spawns a container creating a new network namespace
- podman then calls slirp4netns passing it the pid of the container to create a tap interface in the process's network namespace.
My proposal is to change the network creation flow similar to how it is done today when podman is run with root privileges i.e move the network creation and configuration before the container is created. With this:
- Rootless podman would create the network namespace.
- slirp4netns would then be called to create the tap interface.
- podman would then call the OCI runtime to create the sandbox.
This approach would benefit VM-based runtimes like Kata, as the network would be fully configured when the container is created (Kata scans the network namespace at the time of container creation assuming that the network has been created and configured)
In case of rootless containers, the network flow is as follows:
My proposal is to change the network creation flow similar to how it is done today when podman is run with root privileges i.e move the network creation and configuration before the container is created. With this:
This approach would benefit VM-based runtimes like Kata, as the network would be fully configured when the container is created (Kata scans the network namespace at the time of container creation assuming that the network has been created and configured)