Project

Profile

Help

Issue #1134

Updated by bmbouter almost 9 years ago

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":https://github.com/pulp/pulp_puppet/blob/4640586d7cf6c2b9e78c08408edb9ce6ce5ec2f4/pulp_puppet_plugins/pulp_puppet/plugins/distributors/publish.py#L228 is run. 
 2) create a puppet repo like: 

 <pre> 
 pulp-admin -u admin -p admin puppet repo create --repo-id zoo-puppet 
 </pre> 

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

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

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

 <pre> 
  pulp-admin -u admin -p admin -vv puppet repo publish run --repo-id zoo-puppet 
 </pre> 

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

 <pre> 
  { 
   "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" 
 } 
 </pre> 

 I don't know what is supposed to be there, but "the code saves the associated traceback":https://github.com/pulp/pulp_puppet/blob/4640586d7cf6c2b9e78c08408edb9ce6ce5ec2f4/pulp_puppet_plugins/pulp_puppet/plugins/distributors/publish.py#L229 for each error in the code so either a total count or a traceback for each individual error should go there.

Back