Project

Profile

Help

Issue #1813

Handle duplicate key error in comps.xml upload

Added by ipanova@redhat.com over 4 years ago. Updated over 1 year ago.

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

Description

$ pulp-admin rpm repo uploads comps --repo-id pk --file /home/ipanova/pulp_development/pulp_rpm/sample-comps.xml

+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: sample-comps.xml
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: sample-comps.xml
... 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: sample-comps.xml
[==================================================] 100%
8407/8407 bytes
... completed

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

[\]
Running...

Task Succeeded

Deleting the upload request...
... completed

$ sudo less /var/log/messages| tail -15
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480) unexpected error occurred importing uploaded file: Tried to save duplicate unique keys (E11000 duplicate key error index: pulp_database.units_package_group.$package_group_id_1_repo_id_1  dup key: { : "additional-devel", : "pk" })
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480) Traceback (most recent call last):
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)   File "/home/ipanova/pulp_development/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 118, in upload
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)     handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)   File "/home/ipanova/pulp_development/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 264, in _handle_group_category_comps
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)     group.GROUP_TAG, conduit, repo)
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)   File "/home/ipanova/pulp_development/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 307, in _get_and_save_file_units
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)     model.save()
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 390, in save
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480)     raise NotUniqueError(message %% unicode(err))
Apr  5 11:54:09 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (5176-56480) NotUniqueError: Tried to save duplicate unique keys (E11000 duplicate key error index: pulp_database.units_package_group.$package_group_id_1_repo_id_1  dup key: { : "additional-devel", : "pk" })
Apr  5 11:54:09 ina pulp: celery.worker.job:INFO: Task pulp.server.managers.content.upload.import_uploaded_unit[2a38c503-08e1-433d-8975-0d3df1a79324] succeeded in 0.0452548449393s: {'details': {'errors': ['unexpected error occurred importing uploaded file: Tried to save duplicate unique keys (E11000...
Apr  5 11:54:09 ina pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[fee4cef8-dbc3-48b8-a147-5853efa54a20] succeeded in 0.0112568598706s: None

Associated revisions

Revision 38be9b15 View on GitHub
Added by ipanova@redhat.com over 4 years ago

Handle duplicate key error in comps.xml upload.

closes #1813 https://pulp.plan.io/issues/1813

History

#1 Updated by ipanova@redhat.com over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com

#2 Updated by ipanova@redhat.com over 4 years ago

  • Status changed from ASSIGNED to POST

#3 Updated by ipanova@redhat.com over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#4 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.2 to 2.8.3

#5 Updated by mhrivnak over 4 years ago

  • Triaged changed from No to Yes

#6 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#7 Updated by semyers over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF