Rally throwing errors for heat testing.

asked 2015-03-18 10:30:02 -0500

Bindas gravatar image

Hello Openstackers,

I am running into an issue where i am doing rally testing for heat using create-and-delete-stack.yaml that is provided in scenario testing in heat folder. below you can see i am starting a rally task and its failing due to ("ERROR: Missing required credential: roles ['heat_stack_owner']",) but when i do keystone role-list i am able to see heat_stack_owner role there, not sure what exactly i am doing wrong but any help would be useful. btw i am following this guide https://www.mirantis.com/blog/5-steps...

root@devstack:~/rally/samples/tasks/scenarios/heat# rally task start create-and-delete-stack.yaml
 Preparing input task

Input task is:
        type: "constant"
        times: 10
        concurrency: 2
          tenants: 2
          users_per_tenant: 3

 Task  1058f0c1-94e8-4b8d-8a21-16bcf365f276: started

Benchmarking... This can take a while...

To track task status use:

        rally task status
        rally task detailed

Task 1058f0c1-94e8-4b8d-8a21-16bcf365f276: finished

test scenario HeatStacks.create_and_delete_stack
args position 0
args values:
OrderedDict([(u'runner', OrderedDict([(u'type', u'constant'), (u'concurrency', 2), (u'times', 10)])), (u'context', OrderedDict([(u'users', OrderedDict([(u'project_domain', u'default'), (u'users_per_tenant', 3), (u'tenants', 2), (u'resource_management_workers', 30), (u'user_domain', u'default')]))]))])
| action | min (sec) | avg (sec) | max (sec) | 90 percentile | 95 percentile | success | count |
| total  | n/a       | n/a       | n/a       | n/a           | n/a           | 0.0%    | 10    |
Load duration: 2.85287499428
Full duration: 8.18649196625

* To plot HTML graphics with this data, run:
        rally task report 1058f0c1-94e8-4b8d-8a21-16bcf365f276 --out output.html

* To get raw JSON output of task results, run:
        rally task results 1058f0c1-94e8-4b8d-8a21-16bcf365f276

Using task: 1058f0c1-94e8-4b8d-8a21-16bcf365f276
root@devstack:~/rally/samples/tasks/scenarios/heat# rally task results 1058f0c1-94e8-4b8d-8a21-16bcf365f276
        "full_duration": 8.186491966247559,
        "key": {
            "kw": {
                "context": {
                    "users": {
                        "project_domain": "default",
                        "resource_management_workers": 30,
                        "tenants": 2,
                        "user_domain": "default",
                        "users_per_tenant": 3
                "runner": {
                    "concurrency": 2,
                    "times": 10,
                    "type": "constant"
            "name": "HeatStacks.create_and_delete_stack",
            "pos": 0
        "load_duration": 2.852874994277954,
        "result": [
                "atomic_actions": {
                    "heat.create_stack": null
                "duration": 0.625485897064209,
                "error": [
                    "ERROR: Missing required credential: roles ['heat_stack_owner']",
                    "Traceback (most recent call last):\n  File \"/usr/local/lib/python2.7/dist-packages/rally/benchmark/runners/base.py\", line 79, in _run_scenario_once\n    method_name)(**kwargs) or scenario_output\n  File \"/usr/local/lib/python2.7/dist-packages/rally/benchmark/scenarios/heat/stacks.py\", line 83, in create_and_delete_stack\n    stack = self._create_stack(template)\n  File \"/usr/local/lib/python2.7/dist-packages/rally/benchmark/scenarios/base.py\", line 255, in func_atomic_actions\n    f = func(self, *args, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/rally/benchmark/scenarios/heat/utils.py\", line 114, in _create_stack\n    stack_id = self.clients(\"heat\").stacks.create(**kw)[\"stack\"][\"id\"]\n  File \"/usr/local/lib/python2.7/dist-packages/heatclient/v1/stacks.py\", line 134, in create\n    data=kwargs, headers=headers)\n  File \"/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py\", line 266, in json_request\n    resp = self._http_request(url, method, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py\", line 221, in _http_request\n    raise exc.from_response(resp)\nHTTPBadRequest: ERROR: Missing required credential: roles ['heat_stack_owner']\n"
                "idle_duration": 0,
                "scenario_output": {
                    "data": {},
                    "errors": ""
                "timestamp": 1426658891.068377 ...
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2017-03-21 02:53:28 -0500

Hi! All heat scenarios have regular CI with devstack. It means that default roles for a newly created user should be enough. If it doesn't work on your environment, you can use roles context which allows to add roles to new users.

http://rally.readthedocs.io/en/latest/plugins/plugin_reference.html#roles-context (http://rally.readthedocs.io/en/latest...)

edit flag offensive delete link more

answered 2015-03-23 02:04:06 -0500

huangtianhua gravatar image

Are you sure the user has the role 'heat_stack_owner' in the project? And the default value of "trusts_delegated_roles" option in heat.conf is changed to [] in Kilo and heat will delegate all roles of trustor. You can try to set the option to [], if you do not want to delegate subset roles.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-18 10:30:02 -0500

Seen: 1,247 times

Last updated: Mar 23 '15