Bug 1598711 - When there are no defined flavors, check will return a status code CRITICAL with this message "Unable to contact nova API."
Summary: When there are no defined flavors, check will return a status code CRITICAL w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: osops-tools-monitoring-oschecks
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: z13
: 10.0 (Newton)
Assignee: Matthias Runge
QA Contact: Leonid Natapov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-06 09:37 UTC by Andre
Modified: 2019-10-23 08:37 UTC (History)
3 users (show)

Fixed In Version: osops-tools-monitoring-oschecks-0.1-0.11.9f8354bgit.el7ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-23 08:37:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1784650 0 None None None 2018-07-31 15:18:14 UTC
OpenStack gerrit 584464 0 None None None 2018-11-27 17:23:52 UTC
Red Hat Product Errata RHBA-2019:3183 0 None None None 2019-10-23 08:37:55 UTC

Description Andre 2018-07-06 09:37:32 UTC
Description of problem:

If current platform has no defined flavors, check will return a status code CRITICAL with this message "Unable to contact nova API."

In python script we can note this : 
    def flavors_list():
        try:
            return list(client.flavors.list())
        except Exception as ex:
            utils.critical(str(ex))

    elapsed, flavors = utils.timeit(flavors_list)
    if not flavors:
        utils.critical("Unable to contact nova API.")

Script check a list of flavors and if not it will return a CRITICAL error.

But the script doesn't check if API status is OK : we can have no flavors in our environment and when trying to contact flavors API it returns an ERROR

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


How reproducible:
Always


Steps to Reproduce:
1. Run script when there are no flavors

Actual results:
status code CRITICAL with this message "Unable to contact nova API."

Expected results:
No error

Additional info:

Comment 10 errata-xmlrpc 2019-10-23 08:37:52 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://access.redhat.com/errata/RHBA-2019:3183


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