Project

Profile

Help

Issue #3130

closed

Upgrade from Pulp 2.13.2- to Pulp 2.13.3+ can result in "duplicate key error index: pulp_database.erratum_pkglists.$errata_id_1_repo_id_1 dup key"

Added by ttereshc over 4 years ago. Updated about 3 years ago.

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

Description

0040_errata_pkglist_collection.py migration is not safe to re-run if it failed (or was interrupted) for some reason.
Getting E11000 duplicate key error index: pulp_database.erratum_pkglists.$errata_id_1_repo_id_1 dup key...

The erratum_pkglists collection will be created automatically when adding the first entry in the collection. That means the collection will be created without any unique index and the DuplicateKeyError exception in the migration script will never be raised.
The unique index will added by the pulp-manage-db after the migrations in the "Ensure indexes" state but it is too late.

Ensure/create collection and its indexes before migrating data.

Workaround: remove a document from erratum_pkglists collection which triggers the duplicate error. There could be only one duplicated document in the collection because of the way migration script is written.

Added by jwelborn over 4 years ago

Revision fdfdcacf

updated celery conf variables for celery 4. closes #3130

Actions #1

Updated by ttereshc over 4 years ago

  • Subject changed from Upgrade from Pulp 2.13.2- to Pulp 2.13.3+ results in "duplicate key error index: pulp_database.erratum_pkglists.$errata_id_1_repo_id_1 dup key" to Upgrade from Pulp 2.13.2- to Pulp 2.13.3+ can result in "duplicate key error index: pulp_database.erratum_pkglists.$errata_id_1_repo_id_1 dup key"
  • Description updated (diff)
Actions #2

Updated by dalley over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
Actions #3

Updated by ttereshc over 4 years ago

  • Sprint/Milestone set to 47
Actions #4

Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to POST

Added by ttereshc over 4 years ago

Revision 10cb4e59

Ensure indexes are created before erratum pkglists are getting migrated

This is needed for the case when migration is re-run after interruption.

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

Actions #5

Updated by ttereshc over 4 years ago

  • Status changed from POST to MODIFIED
Actions #6

Updated by pcreech over 4 years ago

  • Platform Release set to 2.15.0
Actions #7

Updated by pcreech over 4 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by pthomas@redhat.com over 4 years ago

Verified that upgrade with errata is successful

Actions #9

Updated by pcreech over 4 years ago

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

Updated by bmbouter about 4 years ago

  • Sprint set to Sprint 28
Actions #11

Updated by bmbouter about 4 years ago

  • Sprint/Milestone deleted (47)
Actions #12

Updated by bmbouter about 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF