Bug 1598711
| Summary: | When there are no defined flavors, check will return a status code CRITICAL with this message "Unable to contact nova API." | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Andre <afariasa> |
| Component: | osops-tools-monitoring-oschecks | Assignee: | Matthias Runge <mrunge> |
| Status: | CLOSED ERRATA | QA Contact: | Leonid Natapov <lnatapov> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | mmagr, mrunge, pkilambi |
| Target Milestone: | z13 | Keywords: | Triaged, ZStream |
| Target Release: | 10.0 (Newton) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | osops-tools-monitoring-oschecks-0.1-0.11.9f8354bgit.el7ost | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-10-23 08:37:52 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: | |||
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 |
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: