Revision history [back]

click to hide/show revision 1
initial version

Rally throwing errors for heat testing.

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-openstack-success-benchmarking-heat-rally/#comment-255900

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

Input task is:
---
  HeatStacks.create_and_delete_stack:
    -
      runner:
        type: "constant"
        times: 10
        concurrency: 2
      context:
        users:
          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
        or
        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

HINTS:
* 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": [
                    "HTTPBadRequest",
                    "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
            },
            {
                "atomic_actions": {
                    "heat.create_stack": null
                },
                "duration": 0.6699259281158447,
                "error": [
                    "HTTPBadRequest",
                    "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"
                ],

root@devstack:~/heat-templates/hot# keystone role-list
+----------------------------------+------------------+
|                id                |       name       |
+----------------------------------+------------------+
| 480416bf96a14250b84031c77a2cae6f |      Member      |
| 40ff93921a65413b9f8e9edb11807151 |  ResellerAdmin   |
| 9fe2ff9ee4384b1894a90878d3e92bab |     _member_     |
| aeb42165645c484ab6a37cf3d38d5ee1 |      admin       |
| 151882ef36db430b84502fb14e753018 |   anotherrole    |
| 939fea9f6ec64bb0b762356958d06e0a | heat_stack_owner |
| 362d496938a74d39b29e8109ad5e0956 | heat_stack_user  |
| 09a02f06b731409a9b7f42ab59bc730e |     service      |
+----------------------------------+------------------+