Bug 1332661

Summary: config_tempest.py raises KeyError: 'volume' when executed from the undercloud
Product: Red Hat OpenStack Reporter: Harry Rybacki <hrybacki>
Component: openstack-tempestAssignee: Daniel Mellado <dmellado>
Status: CLOSED CURRENTRELEASE QA Contact: tkammer
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: apevec, hrybacki, lhh, mbultel, slinaber
Target Milestone: asyncKeywords: ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 13:05:06 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:

Description Harry Rybacki 2016-05-03 16:45:39 UTC
Description of problem:

tempest/tools/config_tempest.py assumes Cinder is available and accessible at the time the script is called. When calling the script using undercloud services only (source stackrc) it bawks and raises a KeyError. 

There a three lines[1-3] that are the source of the problem and simply removing them prior to execution of the script is working as a temporary solution. 

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


How reproducible:
Easy

Steps to Reproduce:
1. Deploy an under/overcloud (Mitaka or Liberty) using TripleO-Quickstart[4]
2. ssh into the undercloud as the stack user
3. $ source stackrc
4. $ mkdir /home/stack/tempest
5. $ cd /home/stack/tempest
6. $ /usr/share/openstack-tempest*/tools/configure-tempest-directory
8. $ tools/config_tempest.py --out etc/tempest.conf --network-id <your network uuid> --deployer-input /home/stack/tempest-deployer-input.conf --debug --create identity.uri http://192.0.2.1:5000/v2.0 identity.admin_password <your keystone password> network.tenant_network_cidr 192.168.0.0/24 object-storage.operator_role swiftoperator orchestration.stack_owner_role heat_stack_owner


Actual results:

2016-05-03 16:28:02.444 22342 ERROR tempest Traceback (most recent call last):
2016-05-03 16:28:02.444 22342 ERROR tempest   File "tools/config_tempest.py", line 842, in <module>
2016-05-03 16:28:02.444 22342 ERROR tempest     main()
2016-05-03 16:28:02.444 22342 ERROR tempest   File "tools/config_tempest.py", line 180, in main
2016-05-03 16:28:02.444 22342 ERROR tempest     configure_discovered_services(conf, services)
2016-05-03 16:28:02.444 22342 ERROR tempest   File "tools/config_tempest.py", line 772, in configure_discovered_services
2016-05-03 16:28:02.444 22342 ERROR tempest     supported_versions = services[service]['versions']
2016-05-03 16:28:02.444 22342 ERROR tempest KeyError: 'volume'
2016-05-03 16:28:02.444 22342 ERROR tempest 

Expected results:

2016-05-03 16:43:50.585 25875 INFO __main__ [-] Creating configuration file /home/stack/tempest/etc/tempest.conf


Additional info:

Note: 
 - tempest-deployer-input.conf used in the above example[5]
 - full output from call to config_tempest.py[6] 

[1] - https://github.com/redhat-openstack/tempest/blob/master/tools/config_tempest.py#L87
[2] - https://github.com/redhat-openstack/tempest/blob/master/tools/config_tempest.py#L98
[3] - https://github.com/redhat-openstack/tempest/blob/master/tools/config_tempest.py#L108
[4] - https://github.com/openstack/tripleo-quickstart/
[5] - http://pastebin.test.redhat.com/370799
[6] - http://pastebin.test.redhat.com/370795

Comment 2 mathieu bultel 2016-05-04 11:18:12 UTC
I submit a review for fixing this issue:
https://review.gerrithub.io/#/c/275202