Issue #428
closedTask state should be 'error' if import content into a repo fails
Description
Description of problem:
The state of the task created for the import of the uploaded content into the repo is 'finished' regardless error specified in the 'result'
$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/1a6f35ae-9b41-495e-bec0-8315f83a4932/'|python -m json.tool:--:-- 587
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 770 100 770 0 0 587 0 0:00:01 0:00:01 -
{
"_href": "/pulp/api/v2/tasks/1a6f35ae-9b41-495e-bec0-8315f83a4932/",
"_id": {
"$oid": "5370e3fc930c1f4a8635b4dc"
},
"_ns": "task_status",
"error": null,
"exception": null,
"finish_time": "2014-05-12T15:08:44Z",
"id": "5370e3fcd428846387488552",
"progress_report": {},
"queue": "reserved_resource_worker-0@ec2-54-220-72-88.eu-west-1.compute.amazonaws.com",
"result": {
"details": {
"errors": [
"metadata for the given package could not be extracted"
]
},
"success_flag": false,
"summary": ""
},
"spawned_tasks": [],
"start_time": "2014-05-12T15:08:44Z",
"state": "finished",
"tags": [
"pulp:repository:m2",
"pulp:action:import_upload"
],
"task_id": "1a6f35ae-9b41-495e-bec0-8315f83a4932",
"task_type": "pulp.server.managers.content.upload.import_uploaded_unit",
"traceback": null
}
Version-Release number of selected component (if applicable):
pulp-2.4.0-0.13.beta
How reproducible:
always
Steps to Reproduce:
1.
2.
3.
Actual results:
task state 'finished', when import fails
Expected results:
task state 'error', when import fails
Additional info:
+ This bug was cloned from Bugzilla Bug #1096886 +