Out of the box, tempest does not run cleanly, needs config file

Bug #899383 reported by Jay Pipes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Jay Pipes

Bug Description

While trying to run tempest against a running devstack, I was just doing:

$> nosestests storm

Out of the box, with a fresh git clone, this causes a bunch of errors like this:

======================================================================
ERROR: test suite for <class 'storm.tests.test_servers_negative.ServersNegativeTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/pymodules/python2.7/nose/util.py", line 478, in try_run
    return func()
  File "/home/stack/tempest/storm/tests/test_servers_negative.py", line 15, in setUpClass
    cls.os = openstack.Manager()
  File "/home/stack/tempest/storm/openstack.py", line 32, in __init__
    self.config.nova.auth_url)
  File "/home/stack/tempest/storm/services/nova/json/servers_client.py", line 12, in __init__
    auth_url, tenant_name)
  File "/home/stack/tempest/storm/common/rest_client.py", line 20, in __init__
    auth_url)
  File "/home/stack/tempest/storm/common/rest_client.py", line 32, in basic_auth
    resp, body = self.http_obj.request(auth_url, 'GET', **params)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1288, in request
    (scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 203, in urlnorm
    raise RelativeURIError("Only absolute URIs are allowed. uri = %s" % uri)
RelativeURIError: Only absolute URIs are allowed. uri = 127.0.0.1

Unfortunately, the RelativeURIError is hiding the real error: that there is no etc/storm.conf file in the /tempest/storm directory. And since there is no way to specify the config file path to use in testing, the storm.config.StormConfig class attempts to use defaults for a bunch of things, including a bad URI default (127.0.0.1 instead of http://127.0.0.1).

The solution is to modify the StormConfig and openstack.Manager classes to have a way of specifying a config file and also to raise a more appropriate error when a config file is not found or a default is incorrect.

Donald Ngo and myself both experienced this issue...

Revision history for this message
Jay Pipes (jaypipes) wrote :
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/2050
Committed: http://github.com/openstack/tempest/commit/7f75763f5403e9bd3353f793fc6af9524f4c3e65
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 7f75763f5403e9bd3353f793fc6af9524f4c3e65
Author: Jay Pipes <email address hidden>
Date: Fri Dec 2 15:53:32 2011 -0500

    Fixes LP Bug#899383 - Cleanup config file search

    Cleans up a bunch of configuration-related errors
    when trying to run tempest out of the box with a
    simple call to:

    $> nosetests storm

    * Raises a sensible error if the config file cannot be found
    * Makes it possible to set the config file directory and
      config file name via environment variables
    * Removes unnecessary calls to create storm.config.StormConfig()
      and share a configuration object by passing the openstack.Manager's
      config object with the various rest client objects
    * Updates the README to show how to make a config file and run
      the tests in tempest

    Change-Id: I60e33595b88df596cc9585bcaf18d37ae77d6f2b

Changed in tempest:
status: In Progress → Fix Committed
tags: added: testcase
tags: added: compute
tags: removed: compute
tags: removed: testcase
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.