[Bug 1645694] [NEW] alarm update failed with --query

dongwenjuan dong.wenjuan at zte.com.cn
Tue Nov 29 12:11:10 UTC 2016


Public bug reported:

Hi all,

I use aodh cli to create a event alarm with query condition, the cli runs successfully.
But when i want to update the query condition, the cli runs failed.
The help info about `--query` para with these two cli  have no difference. 
The information is as follows, Does anyone else know why? Thanks~

stack at cloud:~$ aodh alarm create --name test --type event --event-type
compute.instance.update --query "traits.instance_id=string::3ed4fbc1
-023e-4c4e-85d3-cf6d73c9ac49"

+---------------------------+-----------------------------------------------------------+
| Field                     | Value                                                     |
+---------------------------+-----------------------------------------------------------+
| alarm_actions             | []                                                        |
| alarm_id                  | 8d1018bd-8f14-4f34-b47c-54588488d658                      |
| description               | Alarm when compute.instance.update event occurred.        |
| enabled                   | True                                                      |
| event_type                | compute.instance.update                                   |
| insufficient_data_actions | []                                                        |
| name                      | test                                                      |
| ok_actions                | []                                                        |
| project_id                | f0895991f44044ccba8e62b201b70360                          |
| query                     | traits.instance_id = 3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac49 |
| repeat_actions            | False                                                     |
| severity                  | low                                                       |
| state                     | insufficient data                                         |
| state_timestamp           | 2016-11-29T06:31:50.094836                                |
| time_constraints          | []                                                        |
| timestamp                 | 2016-11-29T06:31:50.094836                                |
| type                      | event                                                     |
| user_id                   | 7d7531a2030d4537b60a5193bf6ab286                          |
+---------------------------+-----------------------------------------------------------+
stack at cloud:~$ 
stack at cloud:~$ 
stack at cloud:~$ aodh alarm update 8d1018bd-8f14-4f34-b47c-54588488d658 --event-type computer.instance.delete --query "traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88"

Invalid input for field/attribute data. Value: '{'alarm_actions': [], 'event_rule': {'query': 'traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88', 'event_type': 'computer.instance.delete'}, 'ok_actions': [], 'name': 'test', 'state': 'insufficient data', 'timestamp': '2016-11-29T06:31:50.094836', 'enabled': True, 'state_timestamp': '2016-11-29T06:31:50.094836', 'severity': 'low', 'alarm_id': '8d1018bd-8f14-4f34-b47c-54588488d658', 'time_constraints': [], 'insufficient_data_actions': [], 'repeat_actions': False, 'user_id': '7d7531a2030d4537b60a5193bf6ab286', 'project_id': 'f0895991f44044ccba8e62b201b70360', 'type': 'event', 'description': 'Alarm when compute.instance.update event occurred.'}'. Value not a valid list: traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88 (HTTP 400) (Request-ID: req-ad8bd440-2784-43b7-98d7-7e0ae27dcebc)
stack at cloud:~$

** Affects: aodh (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to aodh in Ubuntu.
https://bugs.launchpad.net/bugs/1645694

Title:
  alarm update failed with --query

Status in aodh package in Ubuntu:
  New

Bug description:
  Hi all,

  I use aodh cli to create a event alarm with query condition, the cli runs successfully.
  But when i want to update the query condition, the cli runs failed.
  The help info about `--query` para with these two cli  have no difference. 
  The information is as follows, Does anyone else know why? Thanks~

  stack at cloud:~$ aodh alarm create --name test --type event --event-type
  compute.instance.update --query "traits.instance_id=string::3ed4fbc1
  -023e-4c4e-85d3-cf6d73c9ac49"

  +---------------------------+-----------------------------------------------------------+
  | Field                     | Value                                                     |
  +---------------------------+-----------------------------------------------------------+
  | alarm_actions             | []                                                        |
  | alarm_id                  | 8d1018bd-8f14-4f34-b47c-54588488d658                      |
  | description               | Alarm when compute.instance.update event occurred.        |
  | enabled                   | True                                                      |
  | event_type                | compute.instance.update                                   |
  | insufficient_data_actions | []                                                        |
  | name                      | test                                                      |
  | ok_actions                | []                                                        |
  | project_id                | f0895991f44044ccba8e62b201b70360                          |
  | query                     | traits.instance_id = 3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac49 |
  | repeat_actions            | False                                                     |
  | severity                  | low                                                       |
  | state                     | insufficient data                                         |
  | state_timestamp           | 2016-11-29T06:31:50.094836                                |
  | time_constraints          | []                                                        |
  | timestamp                 | 2016-11-29T06:31:50.094836                                |
  | type                      | event                                                     |
  | user_id                   | 7d7531a2030d4537b60a5193bf6ab286                          |
  +---------------------------+-----------------------------------------------------------+
  stack at cloud:~$ 
  stack at cloud:~$ 
  stack at cloud:~$ aodh alarm update 8d1018bd-8f14-4f34-b47c-54588488d658 --event-type computer.instance.delete --query "traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88"

  Invalid input for field/attribute data. Value: '{'alarm_actions': [], 'event_rule': {'query': 'traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88', 'event_type': 'computer.instance.delete'}, 'ok_actions': [], 'name': 'test', 'state': 'insufficient data', 'timestamp': '2016-11-29T06:31:50.094836', 'enabled': True, 'state_timestamp': '2016-11-29T06:31:50.094836', 'severity': 'low', 'alarm_id': '8d1018bd-8f14-4f34-b47c-54588488d658', 'time_constraints': [], 'insufficient_data_actions': [], 'repeat_actions': False, 'user_id': '7d7531a2030d4537b60a5193bf6ab286', 'project_id': 'f0895991f44044ccba8e62b201b70360', 'type': 'event', 'description': 'Alarm when compute.instance.update event occurred.'}'. Value not a valid list: traits.instance_id=string::3ed4fbc1-023e-4c4e-85d3-cf6d73c9ac88 (HTTP 400) (Request-ID: req-ad8bd440-2784-43b7-98d7-7e0ae27dcebc)
  stack at cloud:~$

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aodh/+bug/1645694/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list