Project

Profile

Help

Issue #1134

Publish module failure does not show traceback in "individual_errors" field of progress report

Added by bmbouter over 5 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
High
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

If a module fails to have it symlink created during a publish it is designed to save information about the error in the "individual_errors" section of the API. This does not report back to the user through the API. Here is how you can reproduce:

1) setup a normal pulp developer installation
2) edit the code to manually raise an exception (simulation an IOError for example) so that this except block is run.
2) create a puppet repo like:

pulp-admin -u admin -p admin puppet repo create --repo-id zoo-puppet

3) Upload a puppet module to it so it has something to publish like:

pulp-admin -u admin -p admin puppet repo uploads upload --file ./deric-accounts-1.0.2.tar.gz --repo-id zoo-puppet

4) Attempt to publish it and show the raw response output like:

 pulp-admin -u admin -p admin -vv puppet repo publish run --repo-id zoo-puppet

5) Observe the "individual_errors" section in the "progress_report" says "null".

 {
  "exception": null, 
  "task_type": "pulp.server.managers.repo.publish.publish", 
  "_href": "/pulp/api/v2/tasks/f08aa563-107b-4598-9cb1-bc89c82f3611/", 
  "task_id": "f08aa563-107b-4598-9cb1-bc89c82f3611", 
  "tags": [
    "pulp:repository:zoo-puppet", 
    "pulp:action:publish"
  ], 
  "finish_time": "2015-07-12T19:51:48Z", 
  "_ns": "task_status", 
  "start_time": "2015-07-12T19:51:48Z", 
  "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/trace.py\", line 240, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/server/async/tasks.py\", line 393, in __call__\n    return super(Task, self).__call__(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/trace.py\", line 437, in __protected_call__\n    return self.run(*args, **kwargs)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/server/controllers/repository.py\", line 695, in publish\n    result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/server/controllers/repository.py\", line 749, in _do_publish\n    publish_report = publish_repo(transfer_repo, conduit, call_config)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/server/async/tasks.py\", line 558, in wrap_f\n    return f(*args, **kwargs)\n  File \"/home/bmbouter/Documents/pulp_puppet/pulp_puppet_plugins/pulp_puppet/plugins/distributors/distributor.py\", line 46, in publish_repo\n    report = publish_runner.perform_publish()\n  File \"/home/bmbouter/Documents/pulp_puppet/pulp_puppet_plugins/pulp_puppet/plugins/distributors/publish.py\", line 74, in perform_publish\n    self.progress_report.update_progress()\n  File \"/home/bmbouter/Documents/pulp_puppet/pulp_puppet_common/pulp_puppet/common/publish_progress.py\", line 93, in update_progress\n    self.conduit.set_progress(report)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/plugins/conduits/mixins.py\", line 630, in set_progress\n    set__progress_report=self.progress_report)\n  File \"/usr/lib/python2.7/site-packages/mongoengine/queryset/base.py\", line 531, in update_one\n    upsert=upsert, multi=False, write_concern=write_concern, **update)\n  File \"/home/bmbouter/Documents/pulp/server/pulp/server/db/querysets.py\", line 62, in update\n    super(CriteriaQuerySet, self).update(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/mongoengine/queryset/base.py\", line 514, in update\n    raise OperationError(u'Update failed (%s)' % unicode(err))\nDistributorConduitException: Update failed (not okForStorage)\n", 
  "spawned_tasks": [], 
  "progress_report": {
    "puppet_distributor": {
      "modules": {
        "traceback": null, 
        "execution_time": null, 
        "total_count": 1, 
        "error_message": null, 
        "finished_count": 0, 
        "state": "running", 
        "error_count": 0, 
        "error": "None", 
        "individual_errors": null
      }, 
      "publishing": {
        "http": "not-started", 
        "https": "not-started"
      }, 
      "metadata": {
        "execution_time": null, 
        "state": "not-started", 
        "error_message": null, 
        "traceback": null, 
        "error": "None"
      }
    }
  }, 
  "queue": "reserved_resource_worker-0@dhcp129-138.rdu.redhat.com.dq", 
  "state": "error", 
  "worker_name": "reserved_resource_worker-0@dhcp129-138.rdu.redhat.com", 
  "result": null, 
  "error": {
    "code": "PLP0000", 
    "data": {}, 
    "description": "Update failed (not okForStorage)", 
    "sub_errors": []
  }, 
  "_id": {
    "$oid": "55a2c554b40c856ffd0047e5"
  }, 
  "id": "55a2c554b40c856ffd0047e5"
}

I don't know what is supposed to be there, but the code saves the associated traceback for each error in the code so either a total count or a traceback for each individual error should go there.

History

#1 Updated by bmbouter over 5 years ago

  • Description updated (diff)

#2 Updated by jortel@redhat.com over 5 years ago

  • Priority changed from Normal to High
  • Severity changed from 1. Low to 2. Medium
  • Triaged changed from No to Yes

#3 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

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.

#4 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF