Bug 1332661 - config_tempest.py raises KeyError: 'volume' when executed from the undercloud
Summary: config_tempest.py raises KeyError: 'volume' when executed from the undercloud
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: async
: 8.0 (Liberty)
Assignee: Daniel Mellado
QA Contact: tkammer
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-03 16:45 UTC by Harry Rybacki
Modified: 2016-09-07 13:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-07 13:05:06 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.