Bug 1304978
| Summary: | Handling malformed definitions in gnocchi_resources.yaml like with meters.yaml | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Yurii Prokulevych <yprokule> | |
| Component: | openstack-ceilometer | Assignee: | Mehdi ABAAKOUK <mabaakou> | |
| Status: | CLOSED ERRATA | QA Contact: | Yurii Prokulevych <yprokule> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.0 (Liberty) | CC: | jdanjou, jruzicka, mabaakou, srevivo | |
| Target Milestone: | --- | Keywords: | Triaged, ZStream | |
| Target Release: | 8.0 (Liberty) | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| 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 19:56:08 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
Next upstream Liberty release (5.0.3) will have the fix. Release asked: https://review.openstack.org/#/c/315659/ Unlikely to be encountered in OSP 8, so targeting OSP 9. *** Bug 1353925 has been marked as a duplicate of this bug. *** I have switched it back to OSP8, since this have been backported in upstream liberty 5.0.4. 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 |
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