When no defined flavors, check will return a status code CRITICAL with message "Unable to contact nova API"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Operators |
Fix Released
|
Undecided
|
Nagasai Vinaykumar Kapalavai |
Bug Description
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.
except Exception as ex:
elapsed, flavors = utils.timeit(
if not flavors:
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:
Changed in osops: | |
assignee: | nobody → Nagasai Vinaykumar Kapalavai (vinaykns2) |
Changed in osops: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/584464 /git.openstack. org/cgit/ openstack/ osops-tools- monitoring/ commit/ ?id=a2ff2ebf021 8dd0d1dd72ce1fc 71e22576890ef2
Committed: https:/
Submitter: Zuul
Branch: master
commit a2ff2ebf0218dd0 d1dd72ce1fc71e2 2576890ef2
Author: Nagasai Vinaykumar Kapalavai <email address hidden>
Date: Tue Jul 31 11:13:26 2018 -0400
Fixes for Some oschecks
Currently, (Ceilometer, cinder and nova) checks will throw an error if
result is empty (for ex: nova flavor list) even though the api is working.
With the proposed fix it will just look for the api response and
doesn't matter about the result indeed.
Change-Id: Ib27d2856fa0f0c 794e9ebb348cb84 d3d839adffe
Closes-Bug: #1784650