Skip to content

Commit 93666d1

Browse files
committed
numalign: compat with newer sriov device plugins
Starting OCP >= 4.13 the SRIOV device plugin is also exporting device info as JSON snippet. We need to avoid that because it confuses our logic. Signed-off-by: Francesco Romani <fromani@redhat.com>
1 parent 3f5af11 commit 93666d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/pkg/numalign/numalign.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ func GetPCIDevicesFromEnv(environ []string) []string {
183183
if !strings.HasPrefix(envVar, "PCIDEVICE_") {
184184
continue
185185
}
186+
if strings.Contains(envVar, "_INFO=") {
187+
// sriov device plugin found in OpenShift >= 4.13 (TODO: narro down version)
188+
continue
189+
}
186190
pair := strings.SplitN(envVar, "=", 2)
187191
pciDevs = append(pciDevs, pair[1])
188192
}

0 commit comments

Comments
 (0)