Merge pull request #266 from Random-Liu/update-ocicni

Update ocicni to fc9c77cc55795c09bf1f74b2afd92078a793a69e
This commit is contained in:
Lantao Liu
2017-09-20 16:42:24 -07:00
committed by GitHub
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()
}