Bug 1521005 - gnocchi_aggregation_by_metrics_threshold and gnocchi_aggregation_by_resources_threshold require different parameters
Summary: gnocchi_aggregation_by_metrics_threshold and gnocchi_aggregation_by_resources...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-aodhclient
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: Upstream M3
: 14.0 (Rocky)
Assignee: Mehdi ABAAKOUK
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-05 15:44 UTC by Sasha Smolyak
Modified: 2019-01-11 11:48 UTC (History)
7 users (show)

Fixed In Version: python-aodhclient-1.1.0-0.20180621113437.6d1ad0f.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:48:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 569564 0 None None None 2018-05-19 08:27:14 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:48:50 UTC

Description Sasha Smolyak 2017-12-05 15:44:20 UTC
Description of problem:
When creating aodh gnocchi_aggregation_by_metrics_threshold alarm, the parameter --metrics is needed. 
When creating aodh gnocchi_aggregation_by_resources_threshold alarm, parameter --metric is needed.

This difference blocks the automation and looks like a typo. 

Version-Release number of selected component (if applicable):
openstack-aodh-listener-5.0.0-3.el7ost.noarch
python-aodh-5.0.0-3.el7ost.noarch
openstack-aodh-evaluator-5.0.0-3.el7ost.noarch
puppet-aodh-11.3.0-3.el7ost.noarch
openstack-aodh-api-5.0.0-3.el7ost.noarch
python-aodhclient-0.9.0-1.el7ost.noarch
openstack-aodh-common-5.0.0-3.el7ost.noarch
openstack-aodh-notifier-5.0.0-3.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Try to create aodh alarm create --name 'MyAlarm_gnocchi_aggregation_by_metrics_threshold' --type gnocchi_aggregation_by_metrics_threshold --aggregation-method 'min'     --threshold 4.000000     --resource-type metric     --metrics disk.usage     --query '{'=': {'name': 'disk.usage'}}'

Works ok, alarm is created.

2. Try to create aodh alarm create     --name 'MyAlarm_gnocchi_aggregation_by_resources_threshold' --type gnocchi_aggregation_by_resources_threshold --aggregation-method 'min'     --threshold 4.000000     --resource-type metric     --metrics disk.usage     --query '{'=': {'name': 'disk.usage'}}'
Get error:
"aodh alarm create: error: gnocchi_aggregation_by_resources_threshold requires --metric, --threshold, --aggregation-method, --query and --resource-type"
3.

Actual results:
Get an error

Expected results:
Either metrics or metric for both cases

Additional info:

Comment 5 Mehdi ABAAKOUK 2018-11-26 13:01:00 UTC
To test that we should run both command with "--metric" instead of "--metrics".

Comment 6 Sasha Smolyak 2018-11-26 13:11:50 UTC
No more error when running both with --metric
Verified

Comment 8 errata-xmlrpc 2019-01-11 11:48:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.