Check if nova-service is already disabled
This patch updates VM workload consolidation strategy adding a new condition to check whether nova-compute service is disabled before creating the action. Change-Id: I1accbc7bbd62684dce14ca3b35c92121e923a73a Closes-Bug: #1591927
This commit is contained in:
parent
80867703ba
commit
b3c2d3af1f
|
@ -204,7 +204,9 @@ class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
|||
:return: None
|
||||
"""
|
||||
for hypervisor in model.get_all_hypervisors().values():
|
||||
if len(model.get_mapping().get_node_vms(hypervisor)) == 0:
|
||||
if (len(model.get_mapping().get_node_vms(hypervisor)) == 0 and
|
||||
hypervisor.status !=
|
||||
hyper_state.HypervisorState.DISABLED.value):
|
||||
self.add_action_deactivate_hypervisor(hypervisor)
|
||||
|
||||
def get_prediction_model(self):
|
||||
|
|
Loading…
Reference in New Issue