Project

Profile

Help

Issue #3120

closed

Race condition on saving a distribution unit during "smart proxy" sync

Added by ttereshc about 7 years ago. Updated over 5 years ago.

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

Description

Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) Tried to save duplicate unique keys (insertDocument :: caused by :: 11000 E11000 duplicate key error index: pulp_database.units_distribution.$distribution_id_1_family_1_variant_1_version_1_arch_1  dup key: { : "ks-Repo-Server-1.1.1-x86_64", : "Repo", : "Server", : "1.1.1", : "x86_64" })
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) Traceback (most recent call last):
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 277, in run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     dist_sync.run()
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 128, in run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     self._run(tmp_dir)
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 186, in _run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     unit.save()
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 390, in save
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     raise NotUniqueError(message %% unicode(err))
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) NotUniqueError: Tried to save duplicate unique keys (insertDocument :: caused by :: 11000 E11000 duplicate key error index: pulp_database.units_distribution.$distribution_id_1_family_1_variant_1_version_1_arch_1  dup key: { : "ks-Repo-Server-1.1.1-x86_64", : "Repo", : "Server", : "1.1.1", : "x86_64" })

Race condition happens here when multiple copies of the same repo are synced in parallel (for Katello case - multiple CVs of the repo are synced to "smart proxy")

Actions #1

Updated by ttereshc about 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

Added by ttereshc about 7 years ago

Revision caa1b46f | View on GitHub

Eliminate race condition during sync of a distribution unit

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

Actions #2

Updated by ttereshc about 7 years ago

  • Status changed from ASSIGNED to POST
  • Priority changed from Normal to High
Actions #3

Updated by dalley about 7 years ago

  • Sprint/Milestone set to 47
  • Triaged changed from No to Yes
Actions #4

Updated by ttereshc about 7 years ago

  • Status changed from POST to MODIFIED
Actions #5

Updated by pcreech about 7 years ago

  • Platform Release set to 2.14.3
Actions #6

Updated by pcreech about 7 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by bmbouter over 6 years ago

  • Sprint set to Sprint 28
Actions #8

Updated by bmbouter over 6 years ago

  • Sprint/Milestone deleted (47)
Actions #9

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #10

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF