File: 0008-Add-Debian-specific-CNI-bin-dir-to-ctr-run-command.patch

package info (click to toggle)
containerd 1.6.20~ds1-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,728 kB
  • sloc: sh: 1,174; makefile: 542
file content (22 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/ctr/commands/run/run.go b/cmd/ctr/commands/run/run.go
index bf0ebfe..5c2b489 100644
--- a/cmd/ctr/commands/run/run.go
+++ b/cmd/ctr/commands/run/run.go
@@ -180,7 +180,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
 			}
 		}