aodh client failed to deal with --query parameter

Bug #1657418 reported by TatyanaGladysheva
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Ilya Tyaptin

Bug Description

Detailed bug description:
https://bugs.launchpad.net/python-aodhclient/+bug/1550094 - appropriate upstream bug

Steps to reproduce:
1. create an event alarm:
aodh alarm create -t event --name "TestEvent" --event-type compute.instance.create --query "traits.state=string::active" --alarm-action log://

Expected results:
1. the created alarm is in "ALARM" state

Actual result:
root@node-3:~# aodh alarm create -t event --name "TestEvent" --event-type compute.instance.create --query "traits.state=string::active" --alarm-action log://
Invalid input for field/attribute data. Value: '{'alarm_actions': ['log://'], 'event_rule': {'query': 'traits.state=string::active', 'event_type': 'compute.instance.create'}, 'type': 'event', 'name': 'TestEvent'}'. Value not a valid list: traits.state=string::active (HTTP 400) (Request-ID: req-404026f7-a7d6-44f6-b7f2-abe8e8d188de)

Reproducibility:
100%

Workaround:
Not found

Description of the environment:
9.2 snapshot #776
python-aodhclient 0.3.0-3~u14.04+mos1

Revision history for this message
Nadya Privalova (nprivalova) wrote :
Changed in mos:
importance: Undecided → High
status: New → Confirmed
Changed in mos:
assignee: nobody → Ilya Tyaptin (ityaptin)
milestone: none → 9.2
tags: added: area-ceilometer
Changed in mos:
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/python-aodhclient (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/29915
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: fdbcb30401167b6a7e5e6205472400a6603cea97
Author: liusheng <email address hidden>
Date: Mon Jan 23 13:04:20 2017

Fix the -q/--query in threshold alarm creation

Currently, when creating an threshold with aodhclient, we can use
-q/--query parameter to specify query conditions for alarm rule. but the
parameter is unavailable now.

* The -q parameter is unsupported by cliff, because -q/--quiet is internally
used by cliff. so we drop it.

* The --query cannot be used according to the help string because wrong
implementation.

* The --query usages of threshold/event type alarms and
gnocchi_aggregation_by_resources_threshold type alarms are different.

cherry-picked from 47057a0
Closes-bug: #1657418

Change-Id: I0a1235d12cd6aac80e81aa1c583bc79e2e50667f

Changed in mos:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 snapshot #802.

Actual results:
http://paste.openstack.org/show/596190/

tags: removed: on-verification
Changed in mos:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.