Project

Profile

Help

Issue #1473

closed

Rpm upload fails with unknown error if you have the rpm in an orphan state.

Added by pthomas@redhat.com about 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

If the rpm you are trying to upload is in an orphan state, upload fails with an unknown error.

[root@ibm-x3550m3-08 ~]# pulp-admin rpm repo delete --repo-id test
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [test] successfully deleted

[root@ibm-x3550m3-08 ~]# 
[root@ibm-x3550m3-08 ~]# pulp-admin orphan list
+----------------------------------------------------------------------+
                                Summary
+----------------------------------------------------------------------+

Distribution:            0
Drpm:                    0
Erratum:                 0
Iso:                     0
Package Category:        0
Package Environment:     0
Package Group:           0
Puppet Module:           0
Rpm:                     1
Srpm:                    0
Yum Repo Metadata File:  0
Total:                   1

[root@ibm-x3550m3-08 ~]# pulp-admin rpm repo create --repo-id testSuccessfully created repository [test]

[root@ibm-x3550m3-08 ~]# pulp-admin rpm repo uploads rpm --repo-id test -f cat-1.0-1.noarch.rpm -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: cat-1.0-1.noarch.rpm
... completed

Files to be uploaded:
  cat-1.0-1.noarch.rpm

Creating upload requests on the server...
[==================================================] 100%
Initializing: cat-1.0-1.noarch.rpm
... 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: cat-1.0-1.noarch.rpm
[==================================================] 100%
2420/2420 bytes
... completed

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

[\]
Running...

Task Failed

unexpected error occurred importing uploaded file

Deleting the upload request...
... completed

[root@ibm-x3550m3-08 ~]# 
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256) unexpected error occurred importing uploaded file
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256) Traceback (most recent call last):
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 117, in upload
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)     handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 389, in _handle_package
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)     unit.save()
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 359, in save
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256)     raise NotUniqueError(message %% unicode(err))
Jan 05 19:50:36 ibm-x3550m3-08.lab.eng.brq.redhat.com pulp[30490]: pulp_rpm.plugins.importers.yum.upload:ERROR: (30490-20256) NotUniqueError: Tried to save duplicate unique keys (insertDocument :: caused by :: 11000 E11000 duplicate key error index: pulp_database.units_rpm.$name_1_epoch_1_version_1_release_1_arch_1_checksumtype_1_checksum_1  dup key: { : "cat", : "0", : "1.0", : "1", : "noarch", : "sha256", : "43e77adb7f51b5542b813024a8ee3e477175c142f35982ab5ae2b2978486239f" })

Related issues

Is duplicate of RPM Support - Issue #1406: Uploading the same Content Unit twice causes a 500 errorCLOSED - CURRENTRELEASEdkliban@redhat.comActions

Also available in: Atom PDF