Modifying fake cni plugin

Signed-off-by: abhi <abhi@docker.com>
This commit is contained in:
abhi
2018-03-14 20:05:46 -07:00
parent 92110e1d74
commit 003bbd4292
5 changed files with 26 additions and 150 deletions

View File

@@ -140,6 +140,11 @@ func NewCRIContainerdService(config criconfig.Config, client *containerd.Client)
return nil, fmt.Errorf("failed to initialize cni: %v", err)
}
// Try to load the config if it exists. Just log the error if load fails
// This is not disruptive for containerd to panic
if err := c.netPlugin.Load(cni.WithLoNetwork(), cni.WithDefaultConf()); err != nil {
logrus.WithError(err).Error("Failed to load cni during init, please check CRI plugin status before setting up network for pods")
}
// prepare streaming server
c.streamServer, err = newStreamServer(c, config.StreamServerAddress, config.StreamServerPort)
if err != nil {