Update cri to f913714917d2456d7e65a0be84962b1ce8acb487.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-10-22 22:57:25 -07:00
parent a4b6522e11
commit bee4cc5929
13 changed files with 151 additions and 89 deletions

View File

@@ -18,6 +18,7 @@ package cni
import (
"fmt"
"strings"
"sync"
cnilibrary "github.com/containernetworking/cni/libcni"
@@ -127,6 +128,15 @@ func (c *libcni) Remove(id string, path string, opts ...NamespaceOpts) error {
}
for _, network := range c.networks {
if err := network.Remove(ns); err != nil {
// Based on CNI spec v0.7.0, empty network namespace is allowed to
// do best effort cleanup. However, it is not handled consistently
// right now:
// https://github.com/containernetworking/plugins/issues/210
// TODO(random-liu): Remove the error handling when the issue is
// fixed and the CNI spec v0.6.0 support is deprecated.
if path == "" && strings.Contains(err.Error(), "no such file or directory") {
continue
}
return err
}
}