Heat incorrectly creates alarm metadata when the meter parameter is not in NOVA_METERS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Low
|
Peter Razumovsky |
Bug Description
I try to create a new stack with only one resource which is a Ceilometer alarm. If a "meter" parameter is defined in a ceilometer, alarm is created with a correct query string: "metadata.
Steps to reproduce:
# cat alarm.yaml
heat_template_
resources:
mem_alarm_high:
type: OS::Ceilometer:
properties:
description: Scale-up if the average memory usage >= 80% for 1 minute
meter_name: memory
statistic: avg
period: 60
evaluatio
threshold: 80
alarm_
matching_
compariso
# heat stack-create -f alarm.yaml test-05311438
# ceilometer alarm-show 06ca7544-
+------
| Property | Value |
+------
| alarm_actions | [] |
| alarm_id | 06ca7544-
| comparison_operator | gt |
| description | Scale-up if the average memory usage >= 80% for 1 minute |
| enabled | True |
| evaluation_periods | 1 |
| exclude_outliers | False |
| insufficient_
| meter_name | memory |
| name | test-05311438-
| ok_actions | None |
| period | 60 |
| project_id | d400f2e065f84b5
| query | metadata.
| repeat_actions | True |
| severity | low |
| state | insufficient data |
| statistic | avg |
| threshold | 80.0 |
| type | threshold |
| user_id | f46b8fa2d32c42b
+------
So, all works fine. Now use memory_util:
# cat alarm.yaml
heat_template_
resources:
mem_alarm_high:
type: OS::Ceilometer:
properties:
description: Scale-up if the average memory usage >= 80% for 1 minute
meter_name: memory_util
statistic: avg
period: 60
evaluatio
threshold: 80
alarm_
matching_
compariso
# heat stack-create -f alarm.yaml test-05311439
# ceilometer alarm-show 397b1304-
+------
| Property | Value |
+------
| alarm_actions | [] |
| alarm_id | 397b1304-
| comparison_operator | gt |
| description | Scale-up if the average memory usage >= 80% for 1 minute |
| enabled | True |
| evaluation_periods | 1 |
| exclude_outliers | False |
| insufficient_
| meter_name | memory_util |
| name | test-05311439-
| ok_actions | None |
| period | 60 |
| project_id | d400f2e065f84b5
| query | metadata.
| | 42f0-9210-
| repeat_actions | True |
| severity | low |
| state | insufficient data |
| statistic | avg |
| threshold | 80.0 |
| type | threshold |
| user_id | f46b8fa2d32c42b
+------
Changed in heat: | |
status: | New → In Progress |
Fix: https:/ /review. openstack. org/#/c/ 323256/