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:
@@ -204,7 +204,9 @@ class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
|||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
for hypervisor in model.get_all_hypervisors().values():
|
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)
|
self.add_action_deactivate_hypervisor(hypervisor)
|
||||||
|
|
||||||
def get_prediction_model(self):
|
def get_prediction_model(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user