From eb95c30514183d2191102fe30b5425fc61576b51 Mon Sep 17 00:00:00 2001 From: Daniel Kleinstein Date: Mon, 28 Oct 2024 16:36:50 +0200 Subject: [PATCH] resource: Fix resourceLabeler's sharingDisabled to check if a strategy is defined Signed-off-by: Daniel Kleinstein --- internal/lm/resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lm/resource.go b/internal/lm/resource.go index 5ed73ca18..5a0d5428c 100644 --- a/internal/lm/resource.go +++ b/internal/lm/resource.go @@ -215,7 +215,7 @@ func (rl resourceLabeler) getReplicas() int { // sharingDisabled checks whether the resourceLabeler has sharing disabled // TODO: The nil check here is because we call NewGPUResourceLabeler with a nil config when sharing is disabled. func (rl resourceLabeler) sharingDisabled() bool { - return rl.sharing == nil + return rl.sharing == nil || (rl.sharing.SharingStrategy() == spec.SharingStrategyNone) } // isShared checks whether the resource is shared.