Add hardware.cpu_util in workload_stabilization
Since commit I8df8921337ea3f4e751c0c822d823e64e3ca7e1c the check for hardware.cpu.util was removed. But it can be still used in workload stabilization. Change-Id: I301487837aac2e1e63bce16a79d0f8136452c313
This commit is contained in:

committed by
licanwei

parent
0ed016182e
commit
4db39c527d
@@ -271,6 +271,7 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
||||
"for %(metric_name)s", dict(
|
||||
resource_id=instance.uuid, metric_name=meter))
|
||||
return
|
||||
# cpu_util has been deprecated since Stein.
|
||||
if meter == 'cpu_util':
|
||||
avg_meter /= float(100)
|
||||
LOG.debug('Load of %(metric)s for %(instance)s is %(value)s',
|
||||
@@ -324,6 +325,9 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
||||
avg_meter /= oslo_utils.units.Ki
|
||||
if meter_name == 'compute.node.cpu.percent':
|
||||
avg_meter /= 100
|
||||
# hardware.cpu.util has been deprecated since Stein.
|
||||
if meter_name == 'hardware.cpu.util':
|
||||
avg_meter /= 100
|
||||
LOG.debug('Load of %(metric)s for %(node)s is %(value)s',
|
||||
{'metric': metric,
|
||||
'node': node_id,
|
||||
|
Reference in New Issue
Block a user