Project

Profile

Help

Issue #4130

Updated by kersom about 6 years ago

Upload of RPM packages are failing. 

 *Steps Steps to reproduce:* reproduce: 

 <pre><code class="text"> 

 pulp-admin rpm repo create --repo-id=foo 
 wget https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-non-ascii/rpm-with-non-ascii-1-1.fc25.noarch.rpm 
 pulp-admin -vvv rpm repo uploads rpm --repo-id foo --file rpm-with-non-ascii-1-1.fc25.noarch.rpm  

 </code></pre> 

 *Output:* 

 Output: 


 <pre><code class="text"> 
 [root@r76 ~]# pulp-admin -vvv rpm repo uploads rpm --repo-id foo --file rpm-with-non-ascii-1-1.fc25.noarch.rpm  
 +----------------------------------------------------------------------+ 
                               Unit Upload 
 +----------------------------------------------------------------------+ 

 2018-11-06 16:02:17,025 - DEBUG - sending GET request to /pulp/api/v2/repositories/foo/ 
 2018-11-06 16:02:17,135 - INFO - GET request to /pulp/api/v2/repositories/foo/ with parameters None 
 2018-11-06 16:02:17,135 - INFO - Response status : 200  

 2018-11-06 16:02:17,136 - INFO - Response body : 
  { 
   "scratchpad": {},  
   "display_name": null,  
   "description": null,  
   "last_unit_added": null,  
   "notes": { 
     "_repo-type": "rpm-repo" 
   },  
   "last_unit_removed": null,  
   "content_unit_counts": {},  
   "_ns": "repos",  
   "_id": { 
     "$oid": "5be20134db5ee913bb0318be" 
   },  
   "id": "foo",  
   "_href": "/pulp/api/v2/repositories/foo/" 
 } 

 Extracting necessary metadata for each request... 
 [==================================================] 100% 
 Analyzing: rpm-with-non-ascii-1-1.fc25.noarch.rpm 
 ... completed 

 Creating upload requests on the server... 
 [==================================================] 100% 
 Initializing: rpm-with-non-ascii-1-1.fc25.noarch.rpm 
 2018-11-06 16:02:17,136 - DEBUG - sending POST request to /pulp/api/v2/content/uploads/ 
 2018-11-06 16:02:17,208 - INFO - POST request to /pulp/api/v2/content/uploads/ with parameters None 
 2018-11-06 16:02:17,208 - INFO - Response status : 201  

 2018-11-06 16:02:17,208 - INFO - Response body : 
  { 
   "upload_id": "2e2a69bd-fc0f-449b-b23d-8385f5b701ae",  
   "_href": "/pulp/api/v2/content/uploads/2e2a69bd-fc0f-449b-b23d-8385f5b701ae/" 
 } 

 ... 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 
 canceled entirely using the cancel command. 

 Uploading: rpm-with-non-ascii-1-1.fc25.noarch.rpm 
 2018-11-06 16:02:17,210 - DEBUG - sending PUT request to /pulp/api/v2/content/uploads/2e2a69bd-fc0f-449b-b23d-8385f5b701ae/0/ 
 2018-11-06 16:02:17,278 - INFO - PUT request to /pulp/api/v2/content/uploads/2e2a69bd-fc0f-449b-b23d-8385f5b701ae/0/ 
 2018-11-06 16:02:17,278 - INFO - Response status : 200  

 2018-11-06 16:02:17,278 - INFO - Response body : 
  null 

 [==================================================] 100% 
 6392/6392 bytes 
 ... completed 

 Importing into the repository... 
 2018-11-06 16:02:17,280 - DEBUG - sending POST request to /pulp/api/v2/repositories/foo/actions/import_upload/ 
 2018-11-06 16:02:17,405 - INFO - POST request to /pulp/api/v2/repositories/foo/actions/import_upload/ with parameters {"override_config": {}, "unit_type_id": "rpm", "upload_id": "2e2a69bd-fc0f-449b-b23d-8385f5b701ae", "unit_key": {}, "unit_metadata": {}} 
 2018-11-06 16:02:17,405 - INFO - Response status : 202  

 2018-11-06 16:02:17,405 - INFO - Response body : 
  { 
   "spawned_tasks": [ 
     { 
       "_href": "/pulp/api/v2/tasks/ded240b3-ddf7-418f-bafb-dd9976854514/",  
       "task_id": "ded240b3-ddf7-418f-bafb-dd9976854514" 
     } 
   ],  
   "result": null,  
   "error": null 
 } 

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


 [-] 
 Running... 
 2018-11-06 16:02:18,407 - DEBUG - sending GET request to /pulp/api/v2/tasks/ded240b3-ddf7-418f-bafb-dd9976854514/ 
 2018-11-06 16:02:18,535 - INFO - GET request to /pulp/api/v2/tasks/ded240b3-ddf7-418f-bafb-dd9976854514/ with parameters None 
 2018-11-06 16:02:18,536 - INFO - Response status : 200  

 2018-11-06 16:02:18,536 - INFO - Response body : 
  { 
   "exception": null,  
   "task_type": "pulp.server.managers.content.upload.import_uploaded_unit",  
   "_href": "/pulp/api/v2/tasks/ded240b3-ddf7-418f-bafb-dd9976854514/",  
   "task_id": "ded240b3-ddf7-418f-bafb-dd9976854514",  
   "tags": [ 
     "pulp:repository:foo",  
     "pulp:action:import_upload" 
   ],  
   "finish_time": "2018-11-06T21:02:17Z",  
   "_ns": "task_status",  
   "start_time": "2018-11-06T21:02:17Z",  
   "traceback": "Traceback (most recent call last):\n    File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 367, in trace_task\n      R = retval = fun(*args, **kwargs)\n    File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 529, in __call__\n      return super(Task, self).__call__(*args, **kwargs)\n    File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 107, in __call__\n      return super(PulpTask, self).__call__(*args, **kwargs)\n    File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 622, in __protected_call__\n      return self.run(*args, **kwargs)\n    File \"/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py\", line 218, in import_uploaded_unit\n      unit_metadata, file_path, conduit, call_config)\n    File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py\", line 65, in upload_unit\n      return upload.upload(repo, type_id, unit_key, metadata, file_path, conduit, config)\n    File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py\", line 123, in upload\n      handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)\n    File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py\", line 391, in _handle_package\n      raise PulpCodedException(error_codes.RPM1016)\nPulpCodedException: Uploaded file is not a valid RPM.\n",  
   "spawned_tasks": [],  
   "progress_report": {},  
   "queue": "reserved_resource_worker-0@r76.pulp.vm.dq2",  
   "state": "error",  
   "worker_name": "reserved_resource_worker-0@r76.pulp.vm",  
   "result": null,  
   "error": { 
     "code": "RPM1016",  
     "data": {},  
     "description": "Uploaded file is not a valid RPM.",  
     "sub_errors": [] 
   },  
   "_id": { 
     "$oid": "5be201591fb71554c0fcfebf" 
   },  
   "id": "5be201591fb71554c0fcfebf" 
 [\] 
 Running... 

 Task Failed 

 Uploaded file is not a valid RPM. 

 Deleting the upload request... 
 2018-11-06 16:02:18,536 - DEBUG - sending DELETE request to /pulp/api/v2/content/uploads/2e2a69bd-fc0f-449b-b23d-8385f5b701ae/ 
 2018-11-06 16:02:18,606 - INFO - DELETE request to /pulp/api/v2/content/uploads/2e2a69bd-fc0f-449b-b23d-8385f5b701ae/ with parameters None 
 2018-11-06 16:02:18,606 - INFO - Response status : 200  

 2018-11-06 16:02:18,606 - INFO - Response body : 
  null 

 ... completed 

 </code></pre> 


 *Pulp Packages:* 

 <pre><code class="text"> 

 [root@r76 ~]# rpm -qa | grep pulp 
 python-pulp-repoauth-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-ostree-plugins-1.4.0-0.1.alpha.201811060506git53beed4.el7.noarch 
 pulp-puppet-plugins-2.19.0-0.1.alpha.201811060508gitc54a546.el7.noarch 
 python-pulp-bindings-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-ostree-admin-extensions-1.4.0-0.1.alpha.201811060506git53beed4.el7.noarch 
 pulp-docker-admin-extensions-3.4.0-0.1.alpha.201811060504gita762419.el7.noarch 
 python-pulp-streamer-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 python-pulp-puppet-common-2.19.0-0.1.alpha.201811060508gitc54a546.el7.noarch 
 python-pulp-rpm-common-2.19.0-0.1.alpha.201811060511git204f995.el7.noarch 
 pulp-selinux-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 python-isodate-0.5.0-4.pulp.el7.noarch 
 python-pulp-ostree-common-1.4.0-0.1.alpha.201811060506git53beed4.el7.noarch 
 python-pulp-docker-common-3.4.0-0.1.alpha.201811060504gita762419.el7.noarch 
 python-pulp-python-common-2.1.0-0.1.alpha.201811060502git5e2aa35.el7.noarch 
 python-pulp-oid_validation-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-server-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-docker-plugins-3.4.0-0.1.alpha.201811060504gita762419.el7.noarch 
 pulp-python-plugins-2.1.0-0.1.alpha.201811060502git5e2aa35.el7.noarch 
 pulp-rpm-plugins-2.19.0-0.1.alpha.201811060511git204f995.el7.noarch 
 pulp-puppet-tools-2.19.0-0.1.alpha.201811060508gitc54a546.el7.noarch 
 pulp-admin-client-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-python-admin-extensions-2.1.0-0.1.alpha.201811060502git5e2aa35.el7.noarch 
 pulp-rpm-admin-extensions-2.19.0-0.1.alpha.201811060511git204f995.el7.noarch 
 pulp-deb-admin-extensions-1.9.0-0.1.alpha.201811060524gitb5fc87b.el7.noarch 
 pulp-deb-plugins-1.9.0-0.1.alpha.201811060524gitb5fc87b.el7.noarch 
 python-pulp-client-lib-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 pulp-puppet-admin-extensions-2.19.0-0.1.alpha.201811060508gitc54a546.el7.noarch 
 python-pulp-common-2.19.0-0.1.alpha.201811060516gita768094.el7.noarch 
 python-pulp-deb-common-1.9.0-0.1.alpha.201811060524gitb5fc87b.el7.noarch 

 </code></pre> 

 *System:* 

 <pre><code class="text"> 

 [root@r76 ~]# cat /etc/redhat-release  
 Red Hat Enterprise Linux Server release 7.6 (Maipo 

 </code></pre>

Back