Merge pull request #8672 from zexi/hotfix/scheduler-ignore-non-running

scheduler: ignore non running guests only exclude ready status
This commit is contained in:
Zexi Li
2020-11-06 13:48:05 +08:00
committed by GitHub
+1 -1
View File
@@ -193,7 +193,7 @@ func NewGuestReservedResourceUsedByBuilder(b *HostBuilder, host *computemodels.S
for _, g := range gst {
dSize := guestDiskSize(&g, true)
disk += int64(dSize)
if o.GetOptions().IgnoreNonrunningGuests && !utils.IsInStringArray(g.Status, computeapi.VM_RUNNING_STATUS) {
if o.GetOptions().IgnoreNonrunningGuests && (g.Status == computeapi.VM_READY) {
continue
}
cpu += int64(g.VcpuCount)