Bug 1547400

Summary: verify-config KeyError with tempest plugins (OSP10)
Product: Red Hat OpenStack Reporter: Noam Manos <nmanos>
Component: openstack-tempestAssignee: Chandan Kumar <chkumar>
Status: CLOSED ERRATA QA Contact: Martin Kopec <mkopec>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: apevec, chkumar, jappleii, lhh, slinaber, udesale, whayutin
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tempest-13.0.0-21.bafe630git.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-30 16:59:39 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:
Attachments:
Description Flags
Complete command trace to reproduce bug.
none
verification output none

Description Noam Manos 2018-02-21 09:35:42 UTC
Created attachment 1398582 [details]
Complete command trace to reproduce bug.

Description of problem:

Following RHEL OSP-10.0 Tempest installation guide:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/10/html-single/openstack_integration_test_suite_guide/index#sec-install-tempest-packages

Getting KeyError when executing:
$ tempest verify-config -o ~/mytempest/etc/tempest.conf

Running config verification...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 422, in take_action
    main(parsed_args)
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 389, in main
    services = check_service_availability(os, update)
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 320, in check_service_availability
    codename_match[cfgname]):
KeyError: 'alarming_plugin'


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

rhel-7.4
OSP10 - 2018-02-06.2
/usr/bin/tempest - 0.0.1.dev18
openstack-tempest-13.0.0-16 (rhelosp-10.0-puddle)


How reproducible: Always.

Steps to Reproduce:

1. Install OSP 10.
2. Follow Guide above, or run in Undercloud: 

$ sudo yum install openstack-tempest
$ sudo yum install -y python-ceilometer-tests python-zaqar-tests python-ironic-inspector-tests python-aodh-tests python-nova-tests python-mistral-tests python-heat-tests python-keystone-tests python-ironic-tests python-glance-tests python-swift-tests python-neutron-tests
$ source ~/stackrc
$ tempest init mytempest
$ cd mytempest
$ tempest workspace list
$ external_uuid=$(openstack network list | awk ' /external|public/ {print $2}')
$ /usr/share/openstack-tempest-*/tools/configure-tempest-directory
$ python tools/config_tempest.py --deployer-input ~/tempest-deployer-input.conf --debug --create identity.uri $OS_AUTH_URL identity.admin_password $OS_PASSWORD --network-id $external_uuid
$ tempest verify-config -o ~/mytempest/etc/tempest.conf


Actual results:

Running config verification...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 422, in take_action
    main(parsed_args)
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 389, in main
    services = check_service_availability(os, update)
  File "/usr/lib/python2.7/site-packages/tempest/cmd/verify_tempest_config.py", line 320, in check_service_availability
    codename_match[cfgname]):
KeyError: 'alarming_plugin'

Expected results:
Running config verification...


Additional info:
Complete command trace attached hereby.

Comment 1 Noam Manos 2018-02-21 09:43:35 UTC
To workaround - install correct tempest version with:
$ sudo easy_install pip
$ sudo pip install https://tarballs.openstack.org/tempest/tempest-13.0.0.tar.gz
$ tempest --version

[stack@undercloud-0 ~]$ tempest --version
tempest 13.0.0

Comment 2 Matt Young 2018-04-16 16:28:53 UTC
triage: we suspect that it's reporting the incorrect version but is actually using the correct version.

chkumar to verify

Comment 5 Martin Kopec 2019-01-18 09:00:39 UTC
The problem here can be two things:
1. tempest verify-config doesn't count with external plugins
2. the plugin itself - if the plugin registers itself in a wrong way, it may result in issues like this

We are investigating both of them.


Note to the comment 1, which mentions a workaround: version of tempest which is available via 
sudo pip install https://tarballs.openstack.org/tempest/tempest-13.0.0.tar.gz
is older than the version available in the latest rpm package - that said, the pip version of tempest
is missing some support for external plugins, for example this part:
https://github.com/openstack/tempest/blob/382a6f12a38baab47918fb902ccfd9e451c04800/tempest/config.py#L1118-L1133

Comment 16 Martin Kopec 2019-03-27 14:24:03 UTC
Created attachment 1548602 [details]
verification output

The 'Fixed in version' package fixes the issue, see the output in the attachment -> marking the bug as VERIFIED.

Comment 18 errata-xmlrpc 2019-04-30 16:59:39 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:0922