The parameters of InitCNI should be filled in reverse order.

fix  #131

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
yanxuean 2017-08-16 15:35:34 +08:00
parent 83a20c9fd1
commit 8cc0347b0a
2 changed files with 3 additions and 3 deletions

View File

@ -64,9 +64,9 @@ func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&c.PrintVersion, "version", fs.BoolVar(&c.PrintVersion, "version",
false, "Print cri-containerd version information and quit.") false, "Print cri-containerd version information and quit.")
fs.StringVar(&c.NetworkPluginBinDir, "network-bin-dir", fs.StringVar(&c.NetworkPluginBinDir, "network-bin-dir",
"/etc/cni/net.d", "The directory for putting network binaries.") "/opt/cni/bin", "The directory for putting network binaries.")
fs.StringVar(&c.NetworkPluginConfDir, "network-conf-dir", fs.StringVar(&c.NetworkPluginConfDir, "network-conf-dir",
"/opt/cni/bin", "The directory for putting network plugin configuration files.") "/etc/cni/net.d", "The directory for putting network plugin configuration files.")
fs.StringVar(&c.StreamServerAddress, "stream-addr", fs.StringVar(&c.StreamServerAddress, "stream-addr",
"", "The ip address streaming server is listening on. Default host interface is used if this is empty.") "", "The ip address streaming server is listening on. Default host interface is used if this is empty.")
fs.StringVar(&c.StreamServerPort, "stream-port", fs.StringVar(&c.StreamServerPort, "stream-port",

View File

@ -136,7 +136,7 @@ func NewCRIContainerdService(containerdEndpoint, rootDir, networkPluginBinDir, n
client: client, client: client,
} }
netPlugin, err := ocicni.InitCNI(networkPluginBinDir, networkPluginConfDir) netPlugin, err := ocicni.InitCNI(networkPluginConfDir, networkPluginBinDir)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to initialize cni plugin: %v", err) return nil, fmt.Errorf("failed to initialize cni plugin: %v", err)
} }