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:
parent
83a20c9fd1
commit
8cc0347b0a
@ -64,9 +64,9 @@ func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.BoolVar(&c.PrintVersion, "version",
|
||||
false, "Print cri-containerd version information and quit.")
|
||||
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",
|
||||
"/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",
|
||||
"", "The ip address streaming server is listening on. Default host interface is used if this is empty.")
|
||||
fs.StringVar(&c.StreamServerPort, "stream-port",
|
||||
|
@ -136,7 +136,7 @@ func NewCRIContainerdService(containerdEndpoint, rootDir, networkPluginBinDir, n
|
||||
client: client,
|
||||
}
|
||||
|
||||
netPlugin, err := ocicni.InitCNI(networkPluginBinDir, networkPluginConfDir)
|
||||
netPlugin, err := ocicni.InitCNI(networkPluginConfDir, networkPluginBinDir)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to initialize cni plugin: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user