[Verify] Tempest resources context fails to create network resources for tests

Bug #1550848 reported by Yaroslav Lobankov on 2016-02-28
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Yaroslav Lobankov

Bug Description

Rally from the master branch.

Kilo OpenStack deployed by Fuel 7.0.

1. Install Rally (http://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html).
2. Register a deployment in Rally (http://rally.readthedocs.org/en/latest/tutorial/step_1_setting_up_env_and_running_benchmark_from_samples.html).
3. Create a shared network in the OpenStack. It is needed to make Tempest resources context create network resources.
4. $ rally verify start

Tempest resources context has successfully created all needed resources and tests have been run.

Tempest resources context fails at the point to create network resources (http://paste.openstack.org/show/488470/).

As we can see from the failure, Neutron raises 'BadRequest: Invalid input for tenant_id. Reason: 'None' is not a valid string.' exception. It is because the 'tenant_id' attribute of the 'self.clients.keystone()' instance is None (https://github.com/openstack/rally/blob/master/rally/verification/tempest/config.py#L472). By the way, such attributes like 'project_id', 'user_id', etc. are None as well.

The following commit https://review.openstack.org/#/c/282918/ introduced the issue.

Changed in rally:
assignee: nobody → Yaroslav Lobankov (ylobankov)

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

Changed in rally:
status: New → In Progress
Oleksiy Butenko (obutenko) wrote :

also reproduced on env:

Liberty OpenStack deployed by Fuel 8.0

Changed in rally:
importance: Undecided → High
Tom Patzig (tom-patzig) wrote :

The bug is not only in the tempest part, the normal context network is also affected.
Using VMTasks.boot_runcommand_delete with

"context": {
                "network": {

results in:

ERROR rally.task.engine [-] Invalid input for tenant_id. Reason: 'None' is not a valid string.
ERROR rally.task.engine Traceback (most recent call last):
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/task/engine.py", line 331, in run
ERROR rally.task.engine with context.ContextManager(context_obj):
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/task/context.py", line 206, in __enter__
ERROR rally.task.engine self.setup()
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/task/context.py", line 169, in setup
ERROR rally.task.engine ctx.setup()
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/common/logging.py", line 197, in wrapper
ERROR rally.task.engine result = f(self, *args, **kwargs)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/context/network/networks.py", line 81,

ERROR rally.task.engine network_create_args=self.config["network_create_args"])
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/wrappers/network.py", line 317, in crea

ERROR rally.task.engine network = self.client.create_network(network_args)["network"]
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 102, in with_params
ERROR rally.task.engine ret = self.function(instance, *args, **kwargs)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 584, in create_network
ERROR rally.task.engine return self.post(self.networks_path, body=body)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 298, in post
ERROR rally.task.engine headers=headers, params=params)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 211, in do_request
ERROR rally.task.engine self._handle_fault_response(status_code, replybody)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 185, in _handle_fault_respo

ERROR rally.task.engine exception_handler_v20(status_code, des_error_body)
ERROR rally.task.engine File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 70, in exception_handler_v2

ERROR rally.task.engine status_code=status_code)
ERROR rally.task.engine BadRequest: Invalid input for tenant_id. Reason: 'None' is not a valid string.

The proposed fix needs to go as well to:

rally/plugins/openstack/context/network/networks.py +71

It should be critical, this prevents from using rally for verify.

Yaroslav Lobankov (ylobankov) wrote :

I ran the samples/tasks/scenarios/vm/boot-runcommand-delete.json task and I couldn't reproduce the issue. Could you please provide us with more details how to reproduce it?

Reviewed: https://review.openstack.org/285758
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=6d5f0e645ad20b03bcb17817796acbe354bfd71f
Submitter: Jenkins
Branch: master

commit 6d5f0e645ad20b03bcb17817796acbe354bfd71f
Author: Yaroslav Lobankov <email address hidden>
Date: Sat Feb 27 21:40:27 2016 -0600

    [Verify] Fixing Tempest resources context to create network resources

    Tempest resources context fails to create network resources because
    Neutron raises the 'BadRequest: Invalid input for tenant_id. Reason:
    'None' is not a valid string.' exception.
    The issue was introduced by https://review.openstack.org/#/c/282918/.
    So this patch is intended to fix the issue.

    Closes-Bug: #1550848

    Change-Id: I33b0bb2cdec55acf8446b0fab04e34c9f200fafd

Changed in rally:
status: In Progress → Fix Released

This issue was fixed in the openstack/rally 0.4.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers