Error in rally/verification/verifiers/tempest/config.py

Bug #1335154 reported by Sahil Shah
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Rohan

Bug Description

Hi Team,
I am trying to run rally with tempest and was following the link: http://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/

Following is the scenario I am running:

/home/stack/rally/doc/samples/tasks/tempest/single_test.json
{
    "TempestScenario.single_test": [
        {
            "args": {"test_name": "tempest.api.network.test_networks.NetworksTestJSON.test_create_update_delete_network_subnet"},
            "runner": {
                "type": "constant",
                "times": 1,
                "concurrency": 1
            }
        }
    ]
}

Whenever, I run the following commands:

sudo rally -v task start /home/stack/rally/doc/samples/tasks/tempest/single_test.json
or
rally verify start, I am getting the following error:

2014-06-26 19:48:00.078 14103 INFO rally.benchmark.context.users [-] Task 542a0ff5-12f1-4566-8804-38e049b143eb | Completed: Exit context: `users`

================================================================================
Task 542a0ff5-12f1-4566-8804-38e049b143eb is failed.
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/engine.py", line 157, in validate
    self._validate_config_semantic(self.config)
  File "/usr/local/lib/python2.7/dist-packages/rally/utils.py", line 162, in wrapper
    result = f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/engine.py", line 147, in _validate_config_semantic
    kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/engine.py", line 124, in _validate_config_semantic_helper
    users=[user], task=task)
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/scenarios/base.py", line 126, in validate
    Scenario._validate_helper(user_validators, user, args, task)
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/scenarios/base.py", line 103, in _validate_helper
    result = validator(clients=clients, task=task, **args)
  File "/usr/local/lib/python2.7/dist-packages/rally/benchmark/validation.py", line 237, in tempest_test_exists_validator
    verifier.generate_config_file()
  File "/usr/local/lib/python2.7/dist-packages/rally/verification/verifiers/tempest/tempest.py", line 86, in generate_config_file
    config.TempestConf(self.deploy_id).generate(self.config_file)
  File "/usr/local/lib/python2.7/dist-packages/rally/verification/verifiers/tempest/config.py", line 74, in __init__
    self._load_img()
  File "/usr/local/lib/python2.7/dist-packages/rally/verification/verifiers/tempest/config.py", line 86, in _load_img
    if response.http_status == 200:
AttributeError: 'Response' object has no attribute 'http_status'

Please update if this is an issue with configuration, my internet is working fine so the above should work as it is trying to fetch the cirros image from internet. I checked the http path manually and it is correct.

I think, the pip package "Requests" is causing issue in this case, as http_status is not a valid attribute for the response object.

It should be changed to response.status_code.

I have Requests version - 2.3.0 installed at my system.

Rohan (kanaderohan)
Changed in rally:
assignee: nobody → Rohan (kanaderohan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

Fix proposed to branch: master
Review: https://review.openstack.org/104167

Changed in rally:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/104167
Committed: https://git.openstack.org/cgit/stackforge/rally/commit/?id=d84c854174f0e2dd30b8f2626c1fa56a8702c197
Submitter: Jenkins
Branch: master

commit d84c854174f0e2dd30b8f2626c1fa56a8702c197
Author: Rohan Kanade <email address hidden>
Date: Wed Jul 2 14:05:03 2014 +0200

    Fix wrong attribute name used for http status

    * Use status_code instead of incorrect http_status

    Change-Id: I464f28dcdf96542b8d5420133f13d4150da37aaa
    Closes-Bug: #1335154

Changed in rally:
status: In Progress → Fix Committed
Changed in rally:
status: Fix Committed → 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.