Heat incorrectly creates ceilometer-alarms when the "meter" parameter is not defined in Ceilometer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mirantis OpenStack |
Fix Released
|
Low
|
Peter Razumovsky |
Bug Description
Detailed 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:
root@node-19:~# 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
root@node-19:~# heat stack-create -f alarm.yaml test-05311438
+------
| id | stack_name | stack_status | creation_time | updated_time |
+------
| 34fa084a-
+------
root@node-19:~# ceilometer alarm-list
+------
| Alarm ID | Name | State | Severity | Enabled | Continuous | Alarm condition | Time constraints |
+------
| 06ca7544-
+------
root@node-19:~# 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
+------
root@node-19:~# vi alarm.yaml
root@node-19:~# 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
root@node-19:~# heat stack-create -f alarm.yaml test-05311439
+------
| id | stack_name | stack_status | creation_time | updated_time |
+------
| 34fa084a-
| 7decbaf8-
+------
root@node-19:~# ceilometer alarm-list
+------
| Alarm ID | Name | State | Severity | Enabled | Continuous | Alarm condition | Time constraints |
+------
| 06ca7544-
| 397b1304-
+------
root@node-19:~# 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
+------
Versions:
MOS 7, MOS 8
Expected results:
The query string in an alarm should look like: "metadata.
Changed in mos: | |
assignee: | nobody → Peter Razumovsky (prazumovsky) |
importance: | Undecided → Low |
milestone: | none → 10.0 |
Changed in mos: | |
status: | New → Confirmed |
Changed in mos: | |
status: | Fix Committed → Fix Released |
Related patch is on review: https:/ /review. fuel-infra. org/#/c/ 21548/