Bug 822956 - [RFE] Waiting tasks cannot be cancelled
[RFE] Waiting tasks cannot be cancelled
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: async/tasks (Show other bugs)
2.0.6
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Jason Connor
Preethi Thomas
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-18 11:44 EDT by Jason Connor
Modified: 2014-03-30 21:39 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Connor 2012-05-18 11:44:47 EDT
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 15:06:48 EDT
In release 0.309
Comment 2 Preethi Thomas 2012-09-27 13:25:36 EDT
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 18:42:43 EST
This was a cli parsing bug that has subsequently been fixed
Comment 4 Jay Dobies 2012-12-07 09:06:53 EST
Fixed in the 0.12 beta.
Comment 5 Preethi Thomas 2012-12-11 11:31:37 EST
[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 12:08:26 EST
Pulp v2.0 released

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