fix(scheduler,region,host): guest add alloc extra cpu (#21557)

This commit is contained in:
wanyaoqi
2024-11-07 23:16:07 +08:00
committed by GitHub
parent df5f753cd5
commit 735668d20c
14 changed files with 119 additions and 28 deletions
@@ -81,7 +81,7 @@ func (f *CPUPredicate) Execute(ctx context.Context, u *core.Unit, c core.Candida
}
freeCPUCount := getter.FreeCPUCount(useRsvd)
reqCPUCount := int64(d.Ncpu)
reqCPUCount := int64(d.Ncpu + d.ExtraCpuCount)
if freeCPUCount < reqCPUCount {
totalCPUCount := getter.TotalCPUCount(useRsvd)
h.AppendInsufficientResourceError(reqCPUCount, totalCPUCount, freeCPUCount)