Bug 1557736
| Summary: | discover-tempest-config failure in discovering api_extensions, and verify-config raised IndexError | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Noam Manos <nmanos> | ||||
| Component: | openstack-tempest | Assignee: | Martin Kopec <mkopec> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Chandan Kumar <chkumar> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 13.0 (Queens) | CC: | amodi, apevec, astafeye, chkumar, lhh, ltoscano, mariel, mkopec, slinaber, tfreger, udesale, whayutin | ||||
| Target Milestone: | --- | Keywords: | Triaged, ZStream | ||||
| Target Release: | 14.0 (Rocky) | Flags: | mkopec:
needinfo-
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | openstack-tempest-19.0.0-2.el7ost | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 1554306 | ||||||
| : | 1562085 (view as bug list) | Environment: | |||||
| Last Closed: | 2019-03-18 13:04:08 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: | |||||||
| Bug Depends On: | 1622011 | ||||||
| Bug Blocks: | 1624906 | ||||||
| Attachments: |
|
||||||
|
Description
Noam Manos
2018-03-18 07:59:54 UTC
Using latest verify-config from tempest 18.0.0, I see a fix of:
if not getattr(CONF.service_available,
codename_match[cfgname]):
print('Endpoint type %s is available, service %s should be'
' set as available in the config file.' % (
catalog_type, codename_match[cfgname]))
However, if dictionary "codename_match" does not have for example "loadbalancer", it will fail on KeyError, and will not print message:
(overcloud) (.venv) [stack@undercloud-0 ~]$ tempest verify-config
Running config verification...
cfgname = compute
cfgname = image
cfgname = loadbalancer
Traceback (most recent call last):
File "/home/stack/.venv/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 488, in take_action
main(parsed_args)
File "/home/stack/.venv/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 454, in main
services = check_service_availability(os, update)
File "/home/stack/.venv/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 384, in check_service_availability
codename_match[cfgname]):
KeyError: 'loadbalancer'
Please handle key error for non-existing dict key (in my case "loadbalancer"), to use dict.get() that returns None if no key found. So: < if not getattr(CONF.service_available, codename_match[cfgname])' > should rather be: < 'cfg_value = codename_match.get(cfgname)' if not cfg_value or not getattr(CONF.service_available, cfg_value) > In addition to fixing key error for non-existing dict, please also fix in "verify_tempest_config.py" - "check_service_availability": codename_match dict should include 'loadbalancer': 'loadbalancer'. (see related bug https://bugzilla.redhat.com/show_bug.cgi?id=1562085#c2:) we suspect this is already fixed verify-config issue should be resolved by 591595 (see external trackers). It's waiting for review. The issue in python-tempestconf regarding volume extensions was resolved and merged to master branch, see 568876 in external trackers. python-tempestconf issue will be resolved as soon as python-tempestconf-2.0.0 for RHOS-13 is available, see depends on bug (1621205). python-tempestconf-2.0.0, which includes the fix for python-tempestconf's issue, has been released for RHOS-14, see https://bugzilla.redhat.com/show_bug.cgi?id=1622011 As soon as the patch (https://review.openstack.org/#/c/591595/) will be part of openstack-tempest for RHOS-14, the bug can be verified. To make sure that the patch will be backported to RHOS-13 too, I have created a bug - https://bugzilla.redhat.com/show_bug.cgi?id=1624906 The required patch has been included in openstack-tempest-19.0.0-2.el7ost package, which is available in RHOS-14 repositories also via latest symlink - moving this bug to VERIFIED. 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:0591 |