Description of problem: Running "discover-tempest-config" had failure in discovering "api_extensions", and as consequence, "tempest verify-config" (from python-tempestconf) raised IndexError. Version-Release number of selected component (if applicable): OSP: 13 Puddle: 2018-03-20.2 tempest 18.0.0 How reproducible - Always Steps to Reproduce: 1) Install OSP-13 (master branch). 2) Due to Bug #1554306 - Please also install python-tempestconf: [stack@undercloud-0 ~]$ sudo yum -y install python-tempestconf 3) Run discover-tempest-config: [stack@undercloud-0 ~]$ source overcloudrc (overcloud) [stack@undercloud-0 ~]$ tempest init my_workspace (overcloud) [stack@undercloud-0 ~]$ cd my_workspace (overcloud) [stack@undercloud-0 my_workspace]$ discover-tempest-config --deployer-input 4) Run verify-config: (overcloud) [stack@undercloud-0 my_workspace]$ tempest verify-config -o ./etc/tempest.conf Running config verification... 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 455, in main services = check_service_availability(os, update) File "/home/stack/.venv/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 371, in check_service_availability print "cfgname, value = ", cfgname, codename_match[cfgname] KeyError: 'loadbalancer' -------- Suggestion - Please fix 3 issues: 1) In "verify_tempest_config.py" - function "check_service_availability": codename_match dict should include 'loadbalancer': 'loadbalancer'. A side note - it's rather be 'load-balancer': 'octavia' (as listed by 'openstack endpoint list'). 2) Please handle key error for non-existing dict key (in my case "loadbalancer"), to use dict.get() that returns None if no key found: < 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) > 3) The generated tempest.conf (by discover-tempest-config) is missing configurations for loadbalancer: [service_available] loadbalancer = True # rather be named octavia instead, as mentioned before. [validation] run_validation = True # mandatory to later run octavia tempest plugin tests.
The first part is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1557736 The second part of the bug is really a bug of tempestconf, but at least it can be workarounded (you can pass specific values to override the generated configuration when calling discover-tempest-config, or you can change tempest.conf later).
(In reply to Luigi Toscano from comment #1) > The first part is a duplicate of > https://bugzilla.redhat.com/show_bug.cgi?id=1557736 > > The second part of the bug is really a bug of tempestconf, but at least it > can be workarounded (you can pass specific values to override the generated > configuration when calling discover-tempest-config, or you can change > tempest.conf later). What is duplicate ? 1) In "verify_tempest_config.py" - function "check_service_availability": codename_match dict should include 'loadbalancer': 'loadbalancer'. OR 2) use codename_match.get(cfgname) instead of codename_match[cfgname]. OR 3) tempest.conf missing configurations for loadbalancer. ------------- (1) and (3) are about loadbalancer. (2) is to handle KeyError, which is not the same error as in Bug 1557736 - get_enabled_extensions(service) returned IndexError.
I see your comment on Bug 1557736., so (2) is a breakage/change introduced by the fix for that bug. (1) is a problem of tempest verify CLI command, so openstack-tempest. (3) is related to tempestconf as described in my comment (I see that you opened https://storyboard.openstack.org/#!/story/2001768 ) There are still two different issues in this bug.
(1) and (2) are now also described in Bug 1557736. (3) should probably be fixed in discover-tempest-config. It's not part of https://storyboard.openstack.org/#!/story/2001768, which is a different issue (1508904), with different workaround.
This is an RFE, not a bug. It is covered as part of the ongoing tempest refactoring work. Adding tracker to: https://bugzilla.redhat.com/show_bug.cgi?id=1488126
In latest OSPD 13 puddle 2018-04-10.2, the load balancer service name has been changed to "load_balancer" (was "loadbalancer" previously), so the workaround is: 1) In "verify_tempest_config.py" - function "check_service_availability": codename_match dict should include 'load_balancer': 'load_balancer' 2) In tempest.conf: [service_available] load_balancer = True
*** This bug has been marked as a duplicate of bug 1564866 ***
https://bugzilla.redhat.com/show_bug.cgi?id=1564866 -> Configure Roles to support Octavia API RBAC enforcement adds the same in python-tempestconf so marking it as duplicate.