Issue #420
closedTask failure is not raised when unit unassociation performed on non existent repo
Description
Description of problem:
$ curl H "Accept: application/json" -X POST -k -u admin:admin -d '{"criteria": {"type_ids": ["rpm"], "filters": {"unit": {"name": "cat"}}}}' 'https://example.com/pulp/api/v2/repositories/invalidrepo/actions/unassociate/'| python -m json.tool:--:-- 110
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 245 100 172 100 73 110 46 0:00:01 0:00:01 -
{
"error": null,
"result": null,
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/610fff11-3076-4528-83a4-fa150ea66239/",
"task_id": "610fff11-3076-4528-83a4-fa150ea66239"
}
]
}
$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/610fff11-3076-4528-83a4-fa150ea66239/'|python -m json.tool:--:-- --:--:-- --:--:-- 609
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 552 100 552 0 0 609 0 -
{
"_href": "/pulp/api/v2/tasks/610fff11-3076-4528-83a4-fa150ea66239/",
"_id": {
"$oid": "535f6e46c5fd8d1e2c4b8793"
},
"_ns": "task_status",
"finish_time": "2014-04-29T09:17:58Z",
"queue": "reserved_resource_worker-0@ip-10-90-2-114.eu-west-1.compute.internal",
"result": [],
"spawned_tasks": [],
"start_time": "2014-04-29T09:17:58Z",
"state": "finished",
"tags": [
"pulp:repository:invalidrepo",
"pulp:action:unassociate"
],
"task_id": "610fff11-3076-4528-83a4-fa150ea66239",
"task_type": "pulp.server.managers.repo.unit_association.unassociate_by_criteria"
}
Version-Release number of selected component (if applicable):
2.4.0-0.10.beta
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
no error raised
Expected results:
task state should be 'error' + "Missing resource(s): repo_id=invalidrepo"
Additional info:
+ This bug was cloned from Bugzilla Bug #1092424 +
Related issues