sandbox: Create a symbolic link to the networking namespace
In order to workaround a bug introduced with runc commit bc84f833, we create a symbolic link to our permanent networking namespace so that runC realizes that this is not the host namespace. Although this bug is now fixed upstream (See commit f33de5ab4), this patch works with pre rc3 runC versions. We may want to revert that patch once runC 1.0.0 is released. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
a9724c2c9c
commit
0df8200e12
3 changed files with 106 additions and 10 deletions
|
@ -172,7 +172,7 @@ func (s *Server) loadSandbox(id string) error {
|
|||
// Otherwise, the sandbox will live in the host namespace.
|
||||
netNsPath, err := configNetNsPath(m)
|
||||
if err == nil {
|
||||
netNS, nsErr := netNsGet(netNsPath)
|
||||
netNS, nsErr := netNsGet(netNsPath, sb.name)
|
||||
// If we can't load the networking namespace
|
||||
// because it's closed, we just set the sb netns
|
||||
// pointer to nil. Otherwise we return an error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue