scheduler: ignore non running guests only exclude ready status

This commit is contained in:
Zexi Li
2020-11-05 18:05:49 +08:00
parent 0ed41b09e1
commit b47b0dc863
+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)