Docker 26+ configures networking after the Start response rather than
through prestart hooks, which means the network namespace may not have
any interfaces when the sandbox is first created. This is the runtime-rs
counterpart of the Go runtime fix in PR #12754.
Three changes are made:
1. Discover Docker's pre-created network namespace from OCI hook args
(libnetwork-setkey) during sandbox creation, avoiding a placeholder
netns when the real one is already available.
2. Add an async rescan_network method to VirtSandbox that polls the
network namespace for up to 5 seconds (50ms interval) looking for
late-appearing interfaces, then pushes them to the guest agent.
3. Spawn the async rescan after StartProcess for sandbox containers,
matching the timing of the Go runtime's RescanNetwork goroutine.
Fixes: #9340
Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Made-with: Cursor