From be34eda78a3b77ca03da43ce7dfae0f0694b5975 Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Thu, 28 Mar 2024 21:33:19 +0100 Subject: [PATCH] fix(inventory): fix copy-paste error when matching gpu interface Signed-off-by: Artur Troian --- cluster/kube/operators/clients/inventory/inventory.go | 4 ++-- cluster/types/v1beta3/clients/inventory/inventory.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster/kube/operators/clients/inventory/inventory.go b/cluster/kube/operators/clients/inventory/inventory.go index 62371f97..c8bc8e3c 100644 --- a/cluster/kube/operators/clients/inventory/inventory.go +++ b/cluster/kube/operators/clients/inventory/inventory.go @@ -149,11 +149,11 @@ func tryAdjustGPU(rp *inventoryV1.GPU, res *types.GPU, sparams *crd.SchedulerPar } if attr != nil { - if attr.RAM != "" && attr.RAM != info.MemorySize { + if (attr.RAM != "") && (attr.RAM != info.MemorySize) { continue } - if attr.Interface != "" && attr.RAM != info.Interface { + if (attr.Interface != "") && (attr.Interface != info.Interface) { continue } } diff --git a/cluster/types/v1beta3/clients/inventory/inventory.go b/cluster/types/v1beta3/clients/inventory/inventory.go index 4b758d40..9211097f 100644 --- a/cluster/types/v1beta3/clients/inventory/inventory.go +++ b/cluster/types/v1beta3/clients/inventory/inventory.go @@ -387,11 +387,11 @@ func tryAdjustGPU(rp *inventoryV1.GPU, res *types.GPU, sparams *crd.SchedulerPar } if attr != nil { - if attr.RAM != "" && attr.RAM != info.MemorySize { + if (attr.RAM != "") && (attr.RAM != info.MemorySize) { continue } - if attr.Interface != "" && attr.RAM != info.Interface { + if (attr.Interface != "") && (attr.Interface != info.Interface) { continue } }