1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: Shengjing Zhu <zhsj@debian.org>
Date: Tue, 1 Mar 2022 21:38:59 +0800
Subject: Add Debian specific CNI bin dir to ctr run command
Forwarded: not-needed
---
cmd/ctr/commands/run/run.go | 2 +-
pkg/cri/config/config_unix.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/ctr/commands/run/run.go b/cmd/ctr/commands/run/run.go
index c6833ae..3f8d4e5 100644
--- a/cmd/ctr/commands/run/run.go
+++ b/cmd/ctr/commands/run/run.go
@@ -182,7 +182,7 @@ var Command = cli.Command{
}
var network gocni.CNI
if enableCNI {
- if network, err = gocni.New(gocni.WithDefaultConf); err != nil {
+ if network, err = gocni.New(gocni.WithPluginDir([]string{gocni.DefaultCNIDir, "/usr/lib/cni"}), gocni.WithDefaultConf); err != nil {
return err
}
}
diff --git a/pkg/cri/config/config_unix.go b/pkg/cri/config/config_unix.go
index 4a79063..e992378 100644
--- a/pkg/cri/config/config_unix.go
+++ b/pkg/cri/config/config_unix.go
@@ -63,7 +63,7 @@ func DefaultConfig() PluginConfig {
tree, _ := toml.Load(defaultRuncV2Opts)
return PluginConfig{
CniConfig: CniConfig{
- NetworkPluginBinDir: "/opt/cni/bin",
+ NetworkPluginBinDir: "/usr/lib/cni",
NetworkPluginConfDir: "/etc/cni/net.d",
NetworkPluginMaxConfNum: 1, // only one CNI plugin config file will be loaded
NetworkPluginSetupSerially: false,
|