Bug 822956 - [RFE] Waiting tasks cannot be cancelled
Summary: [RFE] Waiting tasks cannot be cancelled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: async/tasks
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-18 15:44 UTC by Jason Connor
Modified: 2014-03-31 01:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:08:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Jason Connor 2012-05-18 15:44:47 UTC
Description of problem:
Tasks in the waiting state cannot be cancelled without a cancel callback defined

How reproducible:
Always

Comment 1 Jay Dobies 2012-06-29 19:06:48 UTC
In release 0.309

Comment 2 Preethi Thomas 2012-09-27 17:25:36 UTC
fails_qa
 cancelling waiting tasks seems to be cancelling but still shows error in admin.log


[root@pulp-master ~]# pulp-admin  tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  auto_publish, publish
Resources:   faux_test_repo (repository)
State:       Cancelled
Start Time:  Unstarted
Finish Time: 2012-09-27T17:20:42Z
Result:      Incomplete
Task Id:     94f146b5-08c7-11e2-9759-54520075d18e

Operations:  sync
Resources:   faux_test_repo (repository)
State:       Running
Start Time:  2012-09-27T17:20:06Z
Finish Time: Incomplete
Result:      Incomplete
Task Id:     94f1415c-08c7-11e2-9758-54520075d18e

Operations:  publish
Resources:   faux_test_repo (repository)
State:       Waiting
Start Time:  Unstarted
Finish Time: Incomplete
Result:      Incomplete
Task Id:     e5a5f34a-08c7-11e2-a842-54520075d18e


[root@pulp-master ~]# pulp-admin tasks cancel  --task-id e5a5f34a-08c7-11e2-a842-54520075d18e
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

[root@pulp-master ~]# pulp-admin  tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  publish
Resources:   faux_test_repo (repository)
State:       Cancelled
Start Time:  Unstarted
Finish Time: 2012-09-27T17:22:48Z
Result:      Incomplete
Task Id:     e5a5f34a-08c7-11e2-a842-54520075d18e

Operations:  sync
Resources:   faux_test_repo (repository)
State:       Running
Start Time:  2012-09-27T17:20:06Z
Finish Time: Incomplete
Result:      Incomplete
Task Id:     94f1415c-08c7-11e2-9758-54520075d18e


[root@pulp-master ~]# 


2012-09-27 13:22:48,519 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 476, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 933, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/pulp_tasks/pulp_cli.py", line 152, in cancel
    self.context.server.tasks.cancel_task(task_id)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/tasks.py", line 34, in cancel_task
    response = self.server.DELETE(path)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 78, in DELETE
    return self._request('DELETE', path, body=body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 141, in _request
    body = Task(response_body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/responses.py", line 92, in __init__
    self.task_id = response_body['task_id']
KeyError: 'task_id'

Comment 3 Jason Connor 2012-12-03 23:42:43 UTC
This was a cli parsing bug that has subsequently been fixed

Comment 4 Jay Dobies 2012-12-07 14:06:53 UTC
Fixed in the 0.12 beta.

Comment 5 Preethi Thomas 2012-12-11 16:31:37 UTC
[root@preethi-el6-pulp ~]# rpm -q pulp-server
pulp-server-2.0.6-0.14.beta.noarch


[root@preethi-el6-pulp ~]# pulp-admin tasks cancel --task-id ed4cc2a8-7b00-47fd-97db-e12a643c83ea
[root@preethi-el6-pulp ~]# pulp-admin tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  auto_publish, publish
Resources:   fedora16 (repository)
State:       Cancelled
Start Time:  Unstarted
Finish Time: 2012-12-11T13:32:46Z
Result:      Incomplete
Task Id:     ed4cc2a8-7b00-47fd-97db-e12a643c83ea

Comment 6 Preethi Thomas 2013-01-09 17:08:26 UTC
Pulp v2.0 released


Note You need to log in before you can comment on or make changes to this bug.