Bug 1304978 - Handling malformed definitions in gnocchi_resources.yaml like with meters.yaml
Handling malformed definitions in gnocchi_resources.yaml like with meters.yaml
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ceilometer (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity high
: ---
: 8.0 (Liberty)
Assigned To: Mehdi ABAAKOUK
Yurii Prokulevych
: Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-05 02:48 EST by Yurii Prokulevych
Modified: 2016-11-14 14:56 EST (History)
4 users (show)

See Also:
Fixed In Version: openstack-ceilometer-5.0.4-1.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1353925 (view as bug list)
Environment:
Last Closed: 2016-11-14 14:56:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1542189 None None None 2016-02-05 02:49 EST
OpenStack gerrit 280910 None None None 2016-04-29 05:02 EDT

  None (edit)
Description Yurii Prokulevych 2016-02-05 02:48:40 EST
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 05:02:05 EDT
Next upstream Liberty release (5.0.3) will have the fix.
Comment 3 Mehdi ABAAKOUK 2016-05-12 12:22:02 EDT
Release asked: https://review.openstack.org/#/c/315659/
Comment 5 Julien Danjou 2016-06-03 09:32:19 EDT
Unlikely to be encountered in OSP 8, so targeting OSP 9.
Comment 6 Mehdi ABAAKOUK 2016-07-08 08:32:43 EDT
*** Bug 1353925 has been marked as a duplicate of this bug. ***
Comment 7 Mehdi ABAAKOUK 2016-07-08 08:36:36 EDT
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 14:56:08 EST
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.