Bug 1304978 - Handling malformed definitions in gnocchi_resources.yaml like with meters.yaml
Summary: Handling malformed definitions in gnocchi_resources.yaml like with meters.yaml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ceilometer
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Mehdi ABAAKOUK
QA Contact: Yurii Prokulevych
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 07:48 UTC by Yurii Prokulevych
Modified: 2016-11-14 19:56 UTC (History)
4 users (show)

Fixed In Version: openstack-ceilometer-5.0.4-1.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1353925 (view as bug list)
Environment:
Last Closed: 2016-11-14 19:56:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1542189 0 None None None 2016-02-05 07:49:25 UTC
OpenStack gerrit 280910 0 None None None 2016-04-29 09:02:04 UTC
Red Hat Product Errata RHBA-2016:2714 0 normal SHIPPED_LIVE openstack-ceilometer bug fix advisory 2016-11-15 00:53:35 UTC

Description Yurii Prokulevych 2016-02-05 07:48:40 UTC
Clone of upstream bug.
If gnocchi_resources.yaml has malformed definition than all definitions are ignored.

Excerpt from collector.log:
2016-02-05 07:31:12.139 30011 DEBUG ceilometer.dispatcher [-] loading dispatchers from ceilometer.dispatcher load_dispatcher_manager /usr/lib/python2.7/site-packages/ceilometer/dispatcher/__init__.py:41
2016-02-05 07:31:14.867 30011 ERROR stevedore.extension [-] Could not load 'gnocchi': ResourcesDefinitionException {'metrics': ['CustomMetric', 'CustomMetric1', 'CustomMetricRule1'], 'attributes': {'some_attribu
te': 'resource_metadata.some_attribute'}}: Required field resource_type not specified
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension [-] ResourcesDefinitionException {'metrics': ['CustomMetric', 'CustomMetric1', 'CustomMetricRule1'], 'attributes': {'some_attribute': 'resource_metadata.so
me_attribute'}}: Required field resource_type not specified
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension Traceback (most recent call last):
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 162, in _load_plugins
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension verify_requirements,
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 123, in _load_one_plugin
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension verify_requirements,
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 187, in _load_one_plugin
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension obj = plugin(*invoke_args, **invoke_kwds)
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/gnocchi.py", line 182, in __init__
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension self.resources_definition = self._load_resources_definitions(conf)
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/gnocchi.py", line 213, in _load_resources_definitions
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension for r in data.get('resources', [])]
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/gnocchi.py", line 118, in __init__
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension _LE("Required field %s not specified") % field, self.cfg)
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension ResourcesDefinitionException: ResourcesDefinitionException {'metrics': ['CustomMetric', 'CustomMetric1', 'CustomMetricRule1'], 'attributes': {'some_attribu
te': 'resource_metadata.some_attribute'}}: Required field resource_type not specified
2016-02-05 07:31:14.874 30011 ERROR stevedore.extension

For consistency it would be great to have the same error handling like with meters.yaml

Packages:
ceilometer*-5.0.1-1.el7ost.noarch

Regards,
Yurii

Comment 2 Mehdi ABAAKOUK 2016-04-29 09:02:05 UTC
Next upstream Liberty release (5.0.3) will have the fix.

Comment 3 Mehdi ABAAKOUK 2016-05-12 16:22:02 UTC
Release asked: https://review.openstack.org/#/c/315659/

Comment 5 Julien Danjou 2016-06-03 13:32:19 UTC
Unlikely to be encountered in OSP 8, so targeting OSP 9.

Comment 6 Mehdi ABAAKOUK 2016-07-08 12:32:43 UTC
*** Bug 1353925 has been marked as a duplicate of this bug. ***

Comment 7 Mehdi ABAAKOUK 2016-07-08 12:36:36 UTC
I have switched it back to OSP8, since this have been backported in upstream liberty 5.0.4.

Comment 11 errata-xmlrpc 2016-11-14 19:56:08 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://rhn.redhat.com/errata/RHBA-2016-2714.html


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