print user-friendly message if the task cannot be deleted

Bug #1421142 reported by Alexey Khivin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Low
idzzy

Bug Description

I started the task and it was crashed (For example, I just killed the rally process)

then I am trying to remove the task which has the status "running" in the "rally task list" output

~/rally$ rally task delete 249d1138-40a4-4940-9382-364bacd8ff94
Command failed, please check log for more info
2015-02-12 10:11:43.282 9277 CRITICAL rally [-] TaskInvalidStatus: Task `249d1138-40a4-4940-9382-364bacd8ff94` in `running` status but `finished` is required.
2015-02-12 10:11:43.282 9277 TRACE rally Traceback (most recent call last):
2015-02-12 10:11:43.282 9277 TRACE rally File "/usr/local/bin/rally", line 10, in <module>
...
2015-02-12 10:11:43.282 9277 TRACE rally actual=task.status)
2015-02-12 10:11:43.282 9277 TRACE rally TaskInvalidStatus: Task `249d1138-40a4-4940-9382-364bacd8ff94` in `running` status but `finished` is required.
2015-02-12 10:11:43.282 9277 TRACE rally

It would be great to print user-friendly message if the task cannot be deleted. Should Rally advise the user to use --force option?

Tags: ui
Changed in rally:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
idzzy (idzzy) wrote :

I could reproduce this bug.
How about this? if this modification is fit, I would like to handle this bug.

# rally task list
+--------------------------------------+-----------------+----------------------------+-----------+--------+-----+
| uuid | deployment_name | created_at | status | failed | tag |
+--------------------------------------+-----------------+----------------------------+-----------+--------+-----+
| 43551ec8-4b52-4c85-b332-4728a256c4a5 | KVHPoc | 2015-02-15 14:17:38.930293 | running | False | |
+--------------------------------------+-----------------+----------------------------+-----------+--------+-----+

# rally task delete 43551ec8-4b52-4c85-b332-4728a256c4a5
Task `43551ec8-4b52-4c85-b332-4728a256c4a5` in `running` status but `finished` is required.
Use --force option to delete the task with vague state.

Revision history for this message
Boris Pavlovic (boris-42) wrote :

idzzy sounds good to me. If you would like to fix this please assign this bug to you.

idzzy (idzzy)
Changed in rally:
assignee: nobody → idzzy (idzzy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

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

Changed in rally:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/156595
Committed: https://git.openstack.org/cgit/stackforge/rally/commit/?id=203f5a6e4be816d127cb1a92a7102a72e5f64f93
Submitter: Jenkins
Branch: master

commit 203f5a6e4be816d127cb1a92a7102a72e5f64f93
Author: Yusuke Ide <email address hidden>
Date: Tue Feb 17 22:56:51 2015 +0900

    Add user-friendly message if the task cannot be deleted

    If the final status of the task is unfinished(verifying, running) despite
    the rally process is not running any more because the rally process was
    crashed (For example, killed the rally process), could not delete the task
    and outputed confusable trace error message.
    Therefore changed it not to output confusable trace error message and
    print user-friendly message("Use '--force' option to delete the task with
    vague state.").

    Change-Id: Ia5c25022b026c683cdfdfcc6f94928d27e39b9f7
    Closes-Bug: #1421142

Changed in rally:
status: In Progress → Fix Committed
Changed in rally:
milestone: none → 0.0.2
Changed in rally:
status: Fix Committed → 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.