Merge "Add hardware.cpu_util in workload_stabilization"
This commit is contained in:
@@ -271,6 +271,7 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
|||||||
"for %(metric_name)s", dict(
|
"for %(metric_name)s", dict(
|
||||||
resource_id=instance.uuid, metric_name=meter))
|
resource_id=instance.uuid, metric_name=meter))
|
||||||
return
|
return
|
||||||
|
# cpu_util has been deprecated since Stein.
|
||||||
if meter == 'cpu_util':
|
if meter == 'cpu_util':
|
||||||
avg_meter /= float(100)
|
avg_meter /= float(100)
|
||||||
LOG.debug('Load of %(metric)s for %(instance)s is %(value)s',
|
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
|
avg_meter /= oslo_utils.units.Ki
|
||||||
if meter_name == 'compute.node.cpu.percent':
|
if meter_name == 'compute.node.cpu.percent':
|
||||||
avg_meter /= 100
|
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',
|
LOG.debug('Load of %(metric)s for %(node)s is %(value)s',
|
||||||
{'metric': metric,
|
{'metric': metric,
|
||||||
'node': node_id,
|
'node': node_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user