Bug 1393328 - OPS Tools | Availability Monitoring | OS Checks | ceilometer oscheck is failing giving a traceback.
Summary: OPS Tools | Availability Monitoring | OS Checks | ceilometer oscheck is faili...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: sensu
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ga
: 10.0 (Newton)
Assignee: Martin Magr
QA Contact: Leonid Natapov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 10:45 UTC by Leonid Natapov
Modified: 2016-12-14 16:36 UTC (History)
3 users (show)

Fixed In Version: osops-tools-monitoring-oschecks-0.1-0.8.9f8354bgit.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, when the gnocchi API was used instead of the ceilometer API, the `oschecks-check_ceilometer_api` check showed a traceback instead of a reasonable message. Consequently, the check would report an inaccurate state. With this update, checks now report a `WARNING` with a reasonable message, instead of a `CRITICAL` with traceback.
Clone Of:
Environment:
Last Closed: 2016-12-14 16:36:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 395667 0 None None None 2016-11-09 15:21:05 UTC
Red Hat Product Errata RHEA-2016:2950 0 normal SHIPPED_LIVE Operational Tools for Red Hat OpenStack Platform 10 Enhancement Advisory 2016-12-14 20:29:53 UTC

Description Leonid Natapov 2016-11-09 10:45:37 UTC
Description of problem:

When ceilometer_api oscheck I get the following traceback.

    [root@overcloud-controller-0 checks]# ./oschecks-check_ceilometer_api
    CRITICAL: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/oschecks/utils.py", line 110, in safe_run
        method()
      File "/usr/lib/python2.7/site-packages/oschecks/ceilometer.py", line 32, in _check_ceilometer_api
        elapsed, meters = utils.timeit(client.meters.list)
      File "/usr/lib/python2.7/site-packages/oschecks/utils.py", line 97, in wrapper
        res = func(*arg, **kw)
      File "/usr/lib/python2.7/site-packages/oschecks/utils.py", line 105, in timeit
        return func(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/ceilometerclient/v2/meters.py", line 38, in list
        return self._list(options.build_url(path, q, params))
      File "/usr/lib/python2.7/site-packages/ceilometerclient/common/base.py", line 63, in _list
        resp = self.api.get(url)
      File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 355, in get
        return self.client_request("GET", url, **kwargs)
      File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 345, in client_request
        self, method, url, **kwargs)
      File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 261, in client_request
        method, self.concat_url(endpoint, url), **kwargs)
      File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 201, in request
        raise exceptions.from_response(resp, method, url)
    Gone: Gone (HTTP 410) (Request-ID: req-9429dee9-4ac4-4367-b2a4-c889f1ade75b)


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.run ceilomete_api check
2.
3.

Actual results:
check is failing giving a traceback.

Expected results:

check is passing
Additional info:

Comment 1 Martin Magr 2016-11-09 11:33:09 UTC
Found the cause. We will need to adapt the check to contact gnocchi API in case ceilometer API is not used: 

[root@overcloud-controller-1 ~]# /usr/libexec/openstack-monitoring/checks/oschecks-check_ceilometer_api --os-username=admin --os-password=unMsJqwUDpWzXW3pweuFwp4qJ --os-auth-url=http://10.35.173.14:5000/v2.0 --os-tenant-name=admin
{"versions": {"values": [{"status": "stable", "updated": "2013-02-13T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.telemetry-v2+json"}, {"base": "application/xml", "type": "application/vnd.openstack.telemetry-v2+xml"}], "id": "v2", "links": [{"href": "http://10.35.173.14:8042/v2", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}]}}
{"error_message": "410 Gone\n\nThis resource is no longer available. No forwarding address is given.\n\n This telemetry installation is configured to use Gnocchi. Please use the Gnocchi API available on the metric endpoint to retrieve data.  "}

Comment 3 Leonid Natapov 2016-11-23 14:44:09 UTC
Fixed.

Tested with osops-tools-monitoring-oschecks-0.1-0.8.9f8354bgit.el7ost

Comment 5 errata-xmlrpc 2016-12-14 16:36:14 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/RHEA-2016-2950.html


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