Skip to content

Commit 25b3397

Browse files
committed
hack to enable preemption
1 parent 9d4dd50 commit 25b3397

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/controller/quota/quotaforestmanager/qm_lib_backend_with_quotasubt_mgr.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,14 @@ func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi
541541
qm.removeConsumer(consumerID)
542542
return doesFit, preemptIds, strings.TrimSpace(allocResponse.GetMessage())
543543
}
544-
preemptIds = qm.getAppWrappers(allocResponse.GetPreemptedIds())
544+
if len(allocResponse.GetPreemptedIds()) > 0 {
545+
preemptIds = qm.getAppWrappers(allocResponse.GetPreemptedIds())
546+
} else {
547+
var s []string
548+
s = append(s, allocResponse.GetConsumerID())
549+
preemptIds = qm.getAppWrappers(s)
550+
}
551+
545552
return doesFit, preemptIds, strings.TrimSpace(allocResponse.GetMessage())
546553
}
547554

0 commit comments

Comments
 (0)