Bug 965218

Summary: Failed sync tasks provide no indication for failure
Product: [Retired] Pulp Reporter: Justin Sherrill <jsherril>
Component: API/integrationAssignee: Jason Connor <jconnor>
Status: CLOSED NOTABUG QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1 BetaCC: mmccune, omaciel, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-17 21:33:30 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 Justin Sherrill 2013-05-20 18:01:27 UTC
Description of problem:

Currently in pulp the sync history provides a nice summary of the error when a sync failed.  

The sync task however appears to show no such nice error (See examples below of sync task and history item for a filed sync).

This prevents us from showing why the sync failed to the user because the task only gets moved to the history after some seemingly random amount of time.


Version-Release number of selected component (if applicable):

2.1.1


How reproducible:
Always


Steps to Reproduce:
1. Create a repo pointing to a bad url
2. Attempt to sync repo
3. Request the sync task and try to see why it failed

Actual results:
Sync task gives no indication why it failed

Expected results:
Sync task gives some indication why it failed.




Task item:

{
    "call_request_group_id": "e15798ab-291a-42b2-86ea-67934cf20591", 
    "call_request_id": "9141f4d0-a3b3-4d1f-ab7a-6c17c75c251d", 
    "call_request_tags": [
        "pulp:repository:ACME_Corporation-FailProduct-FailRepo", 
        "pulp:action:sync"
    ], 
    "dependency_failures": {}, 
    "exception": [
        "PulpExecutionException: Importer indicated a failed response\n"
    ], 
    "finish_time": "2013-05-20T17:43:48Z", 
    "principal_login": "admin", 
    "progress": {
        "yum_importer": {
            "comps": {
                "state": "NOT_STARTED"
            }, 
            "content": {
                "state": "NOT_STARTED"
            }, 
            "errata": {
                "state": "NOT_STARTED"
            }, 
            "metadata": {
                "state": "FAILED"
            }
        }
    }, 
    "reasons": [], 
    "response": "accepted", 
    "result": null, 
    "schedule_id": null, 
    "start_time": "2013-05-20T17:43:47Z", 
    "state": "error", 
    "tags": [
        "pulp:repository:ACME_Corporation-FailProduct-FailRepo", 
        "pulp:action:sync"
    ], 
    "task_group_id": "e15798ab-291a-42b2-86ea-67934cf20591", 
    "task_id": "9141f4d0-a3b3-4d1f-ab7a-6c17c75c251d", 
    "traceback": [
        "  File \"/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py\", line 138, in _run\n    result = call(*args, **kwargs)\n", 
        "  File \"/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py\", line 118, in sync\n    raise PulpExecutionException(_(Importer indicated a failed response))\n"
    ]
}





History Item:

{
    "_id": {
        "$oid": "519a60d45ca0133bd8ff389c"
    }, 
    "_ns": "repo_sync_results", 
    "added_count": 0, 
    "completed": "2013-05-20T13:43:48-04:00", 
    "details": null, 
    "error_message": null, 
    "exception": null, 
    "id": "519a60d45ca0133bd8ff389c", 
    "importer_id": "yum_importer", 
    "importer_type_id": "yum_importer", 
    "removed_count": 0, 
    "repo_id": "ACME_Corporation-FailProduct-FailRepo", 
    "result": "failed", 
    "started": "2013-05-20T13:43:47-04:00", 
    "summary": {
        "error": "Cannot retrieve repository metadata (repomd.xml) for repository: ACME_Corporation-FailProduct-FailRepo. Please verify its path and try again"
    }, 
    "traceback": null, 
    "updated_count": 0
}

Comment 2 Jason Connor 2013-09-17 21:33:30 UTC
The dispatch system does not know anything about the tasks being dispatched. Detailed reports are stored in the history of the individual tasks themselves (i.e. sync).