Project

Profile

Help

Issue #428

Task state should be 'error' if import content into a repo fails

Added by ipanova@redhat.com over 6 years ago. Updated over 2 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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
% 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 -
:--:-- 587
{
"_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": "",
"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 +

History

#1 Updated by cduryee over 6 years ago

This appears to be fixed by bcourt's patch

https://github.com/pulp/pulp_rpm/pull/491

+ This comment was cloned from Bugzilla #1096886 comment 1 +

#2 Updated by rbarlow over 6 years ago

This was fixed in pulp-2.4.0-0.19.beta.

+ This comment was cloned from Bugzilla #1096886 comment 2 +

#3 Updated by ipanova@redhat.com over 6 years ago

  1. pulp-admin -u admin -p admin rpm repo uploads rpm --repo-id m2 --file ~/some.iso
    ----------------------------------------------------------------------
    Unit Upload
    --------------------------------------------------------------------

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: some.iso
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: some.iso
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: some.iso
... completed

Importing into the repository...
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Failed

metadata for the given package could not be extracted

Deleting the upload request...
... completed

$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/431dd6bb-aacf-4f7b-98dc-eb5b05d364ec/'|python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 772 100 772 0 0 480 0 0:00:01 0:00:01 -
:--:-- 480
{
"_href": "/pulp/api/v2/tasks/431dd6bb-aacf-4f7b-98dc-eb5b05d364ec/",
"_id": {
"$oid": "538d95920c759879a2927ade"
},
"_ns": "task_status",
"error": null,
"exception": null,
"finish_time": "2014-06-03T09:29:54Z",
"id": "538d9592591d260beec5f884",
"progress_report": {},
"queue": "",
"result": {
"details": {
"errors": [
"metadata for the given package could not be extracted"
]
},
"success_flag": false,
"summary": ""
},
"spawned_tasks": [],
"start_time": "2014-06-03T09:29:54Z",
"state": "finished",
"tags": [
"pulp:repository:m2",
"pulp:action:import_upload"
],
"task_id": "431dd6bb-aacf-4f7b-98dc-eb5b05d364ec",
"task_type": "pulp.server.managers.content.upload.import_uploaded_unit",
"traceback": null
}

State of the task is still 'finished' instead of 'error'

+ This comment was cloned from Bugzilla #1096886 comment 3 +

#4 Updated by cduryee over 6 years ago

We can change the task state, but not for pulp 2.4. Moving to medium/no release.

We could also add additional checks to was_successful() in pulp/bindings/responses.py but I think it would be better to just fix it in the json result.

+ This comment was cloned from Bugzilla #1096886 comment 4 +

#5 Updated by ipanova@redhat.com over 6 years ago

It would affect qe automation but we could put 'pass' for 2.4 version.

+ This comment was cloned from Bugzilla #1096886 comment 5 +

#6 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#7 Updated by bmbouter over 2 years ago

  • Severity set to 1. Low

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF