Update ocicni to fc9c77cc55795c09bf1f74b2afd92078a793a69e

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-09-20 21:58:18 +00:00
parent 3647ff5976
commit 2907566565
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package ocicni
import (
"errors"
"fmt"
"os"
"os/exec"
"sort"
"strings"
@@ -158,6 +159,11 @@ func InitCNI(pluginDir string, cniDirs ...string) (CNIPlugin, error) {
return &cniNoOp{}, nil
}
// Fail loudly if plugin directory doesn't exist, because fsnotify watcher
// won't be able to watch it.
if _, err := os.Stat(pluginDir); err != nil {
return nil, err
}
// We do not have a default network, we start the monitoring thread.
go plugin.monitorNetDir()
}