Added a check for non-empty list of VMs to migrate in the global manager
This commit is contained in:
parent
fd889d1e7f
commit
caf8c4dc68
@ -383,6 +383,10 @@ def execute_underload(config, state, host):
|
|||||||
if not vm in vms_ram:
|
if not vm in vms_ram:
|
||||||
del vms_to_migrate[i]
|
del vms_to_migrate[i]
|
||||||
|
|
||||||
|
if not vms_to_migrate:
|
||||||
|
log.info('No VMs to migrate - completed the underload request')
|
||||||
|
return state
|
||||||
|
|
||||||
for vm in vms_cpu.keys():
|
for vm in vms_cpu.keys():
|
||||||
if not vm in vms_ram:
|
if not vm in vms_ram:
|
||||||
del vms_cpu[vm]
|
del vms_cpu[vm]
|
||||||
@ -545,6 +549,10 @@ def execute_overload(config, state, host, vm_uuids):
|
|||||||
if not vm in vms_ram:
|
if not vm in vms_ram:
|
||||||
del vms_to_migrate[i]
|
del vms_to_migrate[i]
|
||||||
|
|
||||||
|
if not vms_to_migrate:
|
||||||
|
log.info('No VMs to migrate - completed the overload request')
|
||||||
|
return state
|
||||||
|
|
||||||
for vm in vms_cpu.keys():
|
for vm in vms_cpu.keys():
|
||||||
if not vm in vms_ram:
|
if not vm in vms_ram:
|
||||||
del vms_cpu[vm]
|
del vms_cpu[vm]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user