Failed task remains in status 'running'

Bug #1383665 reported by Ilya Shakhat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Medium
Boris Pavlovic

Bug Description

Rally starts a task, it fails with traceback, but in the list it has status 'running'

Steps to repro:

1. The scenario:
(.venv)developer@fuel:stack$ cat rally-scenarios/heat/create-and-list-stack.yaml
---
  HeatStacks.create_and_list_stack:
    -
      runner:
        type: "constant"
        times: 10
        concurrency: 1
      context:
        users:
          tenants: 1
          users_per_tenant: 1

2. Start the task:
(.venv)developer@fuel:stack$ rally task start rally-scenarios/heat/create-and-list-stack.yaml
================================================================================
Task 0995939d-a047-473a-b3d5-f0177e5f0be4 is started
--------------------------------------------------------------------------------
Exception in thread Thread-10:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/engine.py", line 267, in consume_results
    "scenario_duration": self.duration,
AttributeError: 'BenchmarkEngine' object has no attribute 'duration'

Command failed, please check log for more info
2014-10-21 11:01:39.528 29147 CRITICAL rally [-] NoSuchRole: There is no role with name `heat_stack_owner`.
2014-10-21 11:01:39.528 29147 TRACE rally Traceback (most recent call last):
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/bin/rally", line 10, in <module>
2014-10-21 11:01:39.528 29147 TRACE rally sys.exit(main())
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/cmd/main.py", line 40, in main
2014-10-21 11:01:39.528 29147 TRACE rally return cliutils.run(sys.argv, categories)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/cmd/cliutils.py", line 277, in run
2014-10-21 11:01:39.528 29147 TRACE rally ret = fn(*fn_args, **fn_kwargs)
2014-10-21 11:01:39.528 29147 TRACE rally File "<string>", line 2, in start
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/cmd/envutils.py", line 64, in default_from_global
2014-10-21 11:01:39.528 29147 TRACE rally return f(*args, **kwargs)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/cmd/commands/task.py", line 96, in start
2014-10-21 11:01:39.528 29147 TRACE rally api.start_task(deploy_id, config_dict, task=task)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/orchestrator/api.py", line 131, in start_task
2014-10-21 11:01:39.528 29147 TRACE rally benchmark_engine.run()
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/utils.py", line 165, in wrapper
2014-10-21 11:01:39.528 29147 TRACE rally result = f(self, *args, **kwargs)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/engine.py", line 219, in run
2014-10-21 11:01:39.528 29147 TRACE rally with base_ctx.ContextManager(context_obj):
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/context/base.py", line 148, in __enter__
2014-10-21 11:01:39.528 29147 TRACE rally self.setup()
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/context/base.py", line 131, in setup
2014-10-21 11:01:39.528 29147 TRACE rally ctx.setup()
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/utils.py", line 165, in wrapper
2014-10-21 11:01:39.528 29147 TRACE rally result = f(self, *args, **kwargs)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/context/roles.py", line 91, in setup
2014-10-21 11:01:39.528 29147 TRACE rally role = self._add_role(self.endpoint, name)
2014-10-21 11:01:39.528 29147 TRACE rally File "/opt/stack/.venv/lib/python2.7/site-packages/rally/benchmark/context/roles.py", line 61, in _add_role
2014-10-21 11:01:39.528 29147 TRACE rally raise exceptions.NoSuchRole(role=context_role)
2014-10-21 11:01:39.528 29147 TRACE rally NoSuchRole: There is no role with name `heat_stack_owner`.
2014-10-21 11:01:39.528 29147 TRACE rally

3. Check the list of tasks:
(.venv)developer@fuel:stack$ rally task list
+--------------------------------------+----------------------------+----------+--------+------------------------------------------------------------+
| uuid | created_at | status | failed | tag |
+--------------------------------------+----------------------------+----------+--------+------------------------------------------------------------+
| 0995939d-a047-473a-b3d5-f0177e5f0be4 | 2014-10-21 11:01:35.946449 | running | False | |
+--------------------------------------+----------------------------+----------+--------+------------------------------------------------------------+

4. Try to get details:
(.venv)developer@fuel:stack$ rally task results 0995939d-a047-473a-b3d5-f0177e5f0be4
The task 0995939d-a047-473a-b3d5-f0177e5f0be4 can not be found

It is expected that the task should be in error status. The results command should print error too.

Changed in rally:
assignee: nobody → Sergey Skripnick (eyerediskin)
Revision history for this message
Boris Pavlovic (boris-42) wrote :

It's MOS bug:

You need to create a "heat_stack_owner" role by hands in MOS

Changed in rally:
assignee: Sergey Skripnick (eyerediskin) → nobody
status: New → Invalid
assignee: nobody → Boris Pavlovic (boris-42)
status: Invalid → Triaged
Revision history for this message
Boris Pavlovic (boris-42) wrote :

During a lot of various changes in Rally this was fixed.

Changed in rally:
importance: Undecided → Medium
status: Triaged → Fix Released
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.