Bug 1130121

Summary: Mismatch between task state and task error details during repo deletion that has bindings
Product: [Retired] Pulp Reporter: Ina Panova <ipanova>
Component: async/tasksAssignee: Chris Duryee <cduryee>
Status: CLOSED CURRENTRELEASE QA Contact: Ina Panova <ipanova>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cduryee, rbarlow
Target Milestone: ---Keywords: Triaged
Target Release: 2.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-24 21:33:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ina Panova 2014-08-14 11:47:34 UTC
Description of problem:
https://pulp-dev-guide.readthedocs.org/en/latest/conventions/exceptions.html#error-details

There is a discrepancy in the state of the task's status and information that is hold in the error details.
State of the task is 'finished' though  the 'error' contains "PLP0007"" error code that tells us about some pulp error( from docs: The following segments have been established * PLP0000-PLP0999 - General Server Errors (and legacy PulpException errors))

Note: the repo is deleted normally.


$ curl -H "Accept: application/json" -X GET  -k -u admin:admin 'https://example.com/pulp/api/v2/tasks/b4eec9bf-5a5a-412d-8832-36bfd568a83c/'|python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1040  100  1040    0     0   1062      0 --:--:-- --:--:-- --:--:--  1062
{
    "_href": "/pulp/api/v2/tasks/b4eec9bf-5a5a-412d-8832-36bfd568a83c/",
    "_id": {
        "$oid": "53ec9fbeb4f7604753993f51"
    },
    "_ns": "task_status",
    "error": {
        "code": "PLP0007",
        "data": {
            "repo_id": "test_repo"
        },
        "description": "Error occurred while cascading delete of repository test_repo to distributor bindings associated with it.",
        "sub_errors": [
            {
                "code": "PLP0009",
                "data": {
                    "resources": {
                        "distributor_id": "yum_distributor",
                        "repo_id": "test_repo"
                    }
                },
                "description": "Missing resource(s): repo_id=test_repo, distributor_id=yum_distributor",
                "sub_errors": []
            }
        ]
    },
    "exception": null,
    "finish_time": "2014-08-14T11:38:38Z",
    "id": "53ec9fbec91e3112048830c7",
    "progress_report": {},
    "queue": "reserved_resource_worker-0.compute.amazonaws.com.dq",
    "result": null,
    "spawned_tasks": [],
    "start_time": "2014-08-14T11:38:38Z",
    "state": "finished",
    "tags": [
        "pulp:repository:test_repo",
        "pulp:action:delete"
    ],
    "task_id": "b4eec9bf-5a5a-412d-8832-36bfd568a83c",
    "task_type": "pulp.server.tasks.repository.delete",
    "traceback": null
}

Version-Release number of selected component (if applicable):
2.4.1-0.1.alpha

How reproducible:


Steps to Reproduce:
1. create consumer,repo
2.bind consumer to the repo
3.delete repo
4. poll task details

Actual results:


Expected results:


Additional info:

Comment 1 Randy Barlow 2014-08-20 16:34:03 UTC
We believe this may already be fixed in 2.4-dev. Please make sure. If it is, please move this bug to ON_QA for QE ACK.

Comment 2 Chris Duryee 2014-08-25 18:52:56 UTC
tested OK for me against 2.4-dev branch. Moving to ON_QA.

Comment 3 Chris Duryee 2014-08-25 18:53:51 UTC
should be MODIFIED actually. Fixing state.

Comment 4 Chris Duryee 2014-09-30 13:52:39 UTC
build: 2.5.0-0.6.beta

Comment 5 Ina Panova 2014-10-02 15:03:39 UTC
Verified.