Merge pull request #135 from yanxuean/myfeature

The parameters of InitCNI should be filled in reverse order
This commit is contained in:
Lantao Liu 2017-08-16 19:50:22 -07:00 committed by GitHub
commit 8e9a251f72
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)
} }