users@openstack raises user unfriendly error message while trying to create tmp users without admin

Bug #1903177 reported by Walt Boring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Triaged
Low
Unassigned

Bug Description

`users@openstack` context is designed to manage (create&delete) temporary users for workloads.
The attempt to create new users will be processed when the plugin configuration looks like:
   {"tenants": 1, "users_per_tenant": 1}

If there is no `admin` user configured for the environment the following error is raised that is not user-friendly at all:

2020-11-05 13:01:26.066 44142 ERROR rally.task.engine During handling of the above exception, another exception occurred:
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine Traceback (most recent call last):
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally/task/engine.py", line 532, in _run_workload
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine with ctx_manager:
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally/task/context.py", line 310, in __enter__
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine self.cleanup()
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally/task/context.py", line 269, in cleanup
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine ctxlst = self._visited or self._get_sorted_context_lst()
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally/task/context.py", line 219, in _get_sorted_context_lst
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine return [c(self.context_obj) for c in ctx_lst]
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally/task/context.py", line 219, in <listcomp>
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine return [c(self.context_obj) for c in ctx_lst]
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine File "/Users/i530566/devel/SAP/.rally-venv/lib/python3.8/site-packages/rally_openstack/task/contexts/keystone/users.py", line 127, in __init__
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine self.credential = context["admin"]["credential"]
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine KeyError: 'admin'
2020-11-05 13:01:26.066 44142 ERROR rally.task.engine

Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

The following part of Rally task triggers users context to try create temporary users. If you remove it, the existing users should be used:

```
"contexts": {
    "users": {
      "tenants": 1,
      "users_per_tenant": 1
    }
  },
```

summary: - running without admin user fails
+ users@openstack raises user unfriendly error message while trying to
+ create tmp users without admin
Changed in rally:
status: New → Triaged
importance: Undecided → Low
description: updated
description: updated
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.