mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(scheduler,region,host): guest add alloc extra cpu (#21557)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user