Strange 'rstrip' error while importing tempest.scenario.test_server_basic_ops

Bug #1279520 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Unassigned

Bug Description

I installed tempest on a clean machine as follows, both ubuntu and fedora:

1a. (fedora) sudo yum -y install python-pip git libxml2-devel libxslt-devel python-devel gcc openssl-devel
1b. (ubuntu) sudo apt-get install python-pip git gcc libxslt1-dev libxml2-dev python-dev zlib1g-dev
2. git clone http://github.com/openstack/tempest.git
3. cd tempest
4. sudo pip install -r requirements.txt
5. testr init
6. testr list-tests --> garbage due to import error

Then

ubuntu@ubuntu:~/tempest$ python -m tempest.scenario.test_server_basic_ops
2014-02-12 20:56:39.590 11694 CRITICAL tempest [-] 'NoneType' object has no attribute 'rstrip'

This is very strange. I also changed all rstrip to strip in the code so 'grep -r rstrip .' is clean, and still get the same error.
 Also:

>>> from tempest.common.utils import test_utils
>>> test_utils.ImageUtils()
2014-02-12 21:05:48.294 18172 CRITICAL tempest [-] 'NoneType' object has no attribute 'rstrip'

Revision history for this message
David Kranz (david-kranz) wrote : Re: Strange 'rstrip' error in test_utils after clean tempest install

I tried adding -U to the pip install which required installing libssl-dev on ubuntu but the error is the same.

summary: - Strange 'rstrip' error in 'testr list-tests' after clean tempest install
+ Strange 'rstrip' error in test_utils after clean tempest install
summary: - Strange 'rstrip' error in test_utils after clean tempest install
+ ImageUtils() logs 'NoneTy'e has no attribute 'rstrip' on clean install
summary: - ImageUtils() logs 'NoneTy'e has no attribute 'rstrip' on clean install
+ ImageUtils() logs 'NoneType' has no attribute 'rstrip' on clean install
Revision history for this message
David Kranz (david-kranz) wrote : Re: ImageUtils() logs 'NoneType' has no attribute 'rstrip' on clean install

After much pain I discovered that this problem is because importing tempest.scenario.test_server_basic_ops ends up indirectly calling OfficialClientManager() which will try to contact nova. But the identity.uri is defaulting to None in the config. So it is novaclient that is logging the error.

The call during import is caused by

class TestServerBasicOps(manager.OfficialClientTest):

    scenario_utils = test_utils.InputScenarioUtils()

I don't think we should be talking to the cloud while doing 'testr list-tests' but I'm not sure of the best way to fix this.

summary: - ImageUtils() logs 'NoneType' has no attribute 'rstrip' on clean install
+ Strange 'rstrip' error while importing
+ tempest.scenario.test_server_basic_ops
Revision history for this message
Matthew Treinish (treinish) wrote :

I believe this particular issue has already been fixed. Can you please confirm and close this if it has been fixed.

Changed in tempest:
status: New → Incomplete
Changed in tempest:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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