From 6844f51c7535031169f03493a0a24212df0d96d9 Mon Sep 17 00:00:00 2001 From: Leo Ochoa Date: Fri, 19 Jun 2026 01:56:44 +0200 Subject: [PATCH] cni: Append fallback paths when resolving host-device binary (#336) When CNI_PATH is set by the container runtime (e.g., Multus on OpenShift sets it to /opt/cni/bin), getCNIPath() returned only that path without including the fallback locations. On OpenShift, the host-device binary is installed by the network operator's CNI plugins DaemonSet into /var/lib/cni/bin, which is part of the fallback but was never searched when CNI_PATH was set. Append fallbackCNIPluginPath to the runtime-provided CNI_PATH so that both locations are searched. Signed-off-by: Leonardo Ochoa-Aday (cherry picked from commit 6639a74783ac4a434404a7e71bb17f33beee4948) --- cni/plugins/amd-host-device/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cni/plugins/amd-host-device/exec.go b/cni/plugins/amd-host-device/exec.go index 03eb5b3e..4193b953 100644 --- a/cni/plugins/amd-host-device/exec.go +++ b/cni/plugins/amd-host-device/exec.go @@ -33,7 +33,7 @@ var defaultExec = &invoke.DefaultExec{ func getCNIPath() string { if p := os.Getenv("CNI_PATH"); p != "" { - return p + return p + string(os.PathListSeparator) + fallbackCNIPluginPath } return fallbackCNIPluginPath }