Some API checks throws tracebacks instead of meaningful errors

Bug #1784651 reported by Nagasai Vinaykumar Kapalavai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Operators
Fix Released
Undecided
Nagasai Vinaykumar Kapalavai

Bug Description

1. oschecks-pacemaker_host_check in case cluster is stopped.

[root@controller-0 checks]# ./oschecks-pacemaker_host_check -r redis
Error: cluster is not currently running on this node
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/pacemaker_host_check.py", line 94, in _pacemaker_host_check
    e.returncode, e.output)
TypeError: not enough arguments for format string

2.glance api in case when trying to run with -h switch (or other switch)

[root@controller-0 checks]# ./oschecks-check_glance_api -h
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/glance.py", line 30, in _check_glance_api
    options, args, client = glance.setup()
  File "/usr/lib/python2.7/site-packages/oschecks/utils.py", line 173, in setup
    self.glance.do_help(options)
TypeError: do_help() takes exactly 3 arguments (2 given)

3.glance upload

[root@controller-0 checks]# ./oschecks-check_glance_upload
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/glance.py", line 120, in _check_glance_upload
    name=options.image_name)
  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/glanceclient/common/utils.py", line 535, in inner
    return RequestIdProxy(wrapped(*args, **kwargs))
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/images.py", line 253, in create
    resp, body = self.http_client.post(url, data=image)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 223, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 342, in request
    return self._handle_response(resp)
  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 107, in _handle_response
    raise exc.from_response(resp, resp.content)
HTTPInternalServerError: 500 Internal Server Error
The server has either erred or is incapable of performing the requested operation.
    (HTTP 500)

Also seems like glance api check doesn't wotk correctly. When images exist it works OK,when no image it says: Unable to contact Glance API but obviously glance API is OK. Please,check it.

Changed in osops:
assignee: nobody → Nagasai Vinaykumar Kapalavai (vinaykns2)
Changed in osops:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osops-tools-monitoring (master)

Reviewed: https://review.openstack.org/581797
Committed: https://git.openstack.org/cgit/openstack/osops-tools-monitoring/commit/?id=4130916b792ff7c9e48c08af39f54749f034fe05
Submitter: Zuul
Branch: master

commit 4130916b792ff7c9e48c08af39f54749f034fe05
Author: Nagasai Vinaykumar Kapalavai <email address hidden>
Date: Wed Jul 11 16:12:32 2018 +0000

    Rework on glance oscheck

    Currently the glance api check is giving tracebacks instead
    of meaningful errors. Couple of changes are made to address the issue.

    Change-Id: I6c71edb528677a4fde0c97eb3d465600b689d1bd
    Closes-Bug: #1784651

Changed in osops:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.