existing_users context cannot fetch 'tenant' and 'user' details from cloud deployment

Bug #1602157 reported by Chandidas Gharami on 2016-07-12
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Chandidas Gharami

Bug Description

'Existing User' context does not work properly in latest rally. It cannot fetch 'tenant' and 'user' details from cloud deployment.

Rally Version User to test:

[root@jb eu_issue]# rally --version

Here I captured the context it created in one sample run.

2016-07-12 07:28:49.725 31446 INFO rally.plugins.eu_issue.eu_test [-] context : {'task': <rally.common.objects.task.Task object at 0x4619390>, 'admin': {'credential': <rally.common.objects.credential.Credential object at 0x46193d0>}, 'iteration': 0L, 'user': {'credential': <rally.common.objects.credential.Credential object at 0x4619550>, 'id': None, 'tenant_id': None}, 'scenario_name': 'ExistingUserTest.log_existing_users', 'config': {'cleanup': [], 'existing_users': [{'username': 'pre_u_1', 'endpoint': None, 'region_name': 'depl-01', 'https_insecure': True, 'permission': 'user', 'tenant_name': 'pre_t_1', 'user_domain_name': None, 'https_cacert': 'ca-chaincert.pem', 'domain_name': None, 'admin_domain_name': 'Default', 'endpoint_type': 'public', 'auth_url': 'https://keystone.service.os:5000/v2.0/', 'password': 'dump1', 'project_domain_name': None}, {'username': 'pre_u_2', 'endpoint': None, 'region_name': 'depl-01', 'https_insecure': True, 'permission': 'user', 'tenant_name': 'pre_t_2', 'user_domain_name': None, 'https_cacert': 'ca-chaincert.pem', 'domain_name': None, 'admin_domain_name': 'Default', 'endpoint_type': 'public', 'auth_url': 'https://keystone.service.os:5000/v2.0/', 'password': 'dump1', 'project_domain_name': None}, {'username': 'pre_u_3', 'endpoint': None, 'region_name': 'depl-01', 'https_insecure': True, 'permission': 'user', 'tenant_name': 'pre_t_3', 'user_domain_name': None, 'https_cacert': 'ca-chaincert.pem', 'domain_name': None, 'admin_domain_name': 'Default', 'endpoint_type': 'public', 'auth_url': 'https://keystone.service.os:5000/v2.0/', 'password': 'dump1', 'project_domain_name': None}]}, 'tenant': {'id': None, 'name': 'pre_t_1'}}

User and Tenant information have below values respectively:
'user': {'credential': <rally.common.objects.credential.Credential object at 0x4619550>, 'id': None, 'tenant_id': None}
'tenant': {'id': None, 'name': 'pre_t_1'}

This shows, current existing_users context cannot retrieve required values from cloud deployment.

However, the scenario can run for all the iterations configured with this 'user' and 'tenant' values in all iterations.

Attached a simple scenario which is used to experiment this.

Chandidas Gharami (chandidas) wrote :
Changed in rally:
assignee: nobody → Chandidas Gharami (chandidas)
Chandidas Gharami (chandidas) wrote :

With the latest code, the 'tenant_id' field is getting populated with right value and as a result 'tenant-context' is also getting populated with all the configured user. This would be sufficient for distribution of tenants across scenario runs.

However, user 'id' field in user's list is still None. This might not be an issue as Credential object of the user is correctly populated. But if user id is used later in any part of a scenario, it will be None.

Working to fix the 'user id' issue.

Changed in rally:
status: New → Confirmed

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

Changed in rally:
status: Confirmed → In Progress
Changed in rally:
importance: Undecided → Medium
importance: Medium → High

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

commit a5025142ff78c0d8c3be395ce00534ea7af604bd
Author: chandidas <email address hidden>
Date: Thu Jul 28 03:01:45 2016 -0500

    Fix to solve None user id in existing_users context

    This fix contains following changes
     - removed keystone version specific tenant_id fetch logic
     - called get_user_id api to fetch correct value of user_id
     - Updated Unittest case to cover modified code.

    Change-Id: Id0c8135abe9d980b5a5f11e0123d7e9904c4f473
    Closes-Bug: #1602157

Changed in rally:
status: In Progress → Fix Released
summary: - existing_users context does not work in latest rally
+ existing_users context cannot fetch 'tenant' and 'user' details from
+ cloud deployment
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers