Project

General

Profile

Bug #26412

manifest upload duplicate key value violates unique constraint

Added by Justin Sherrill over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Description of problem:
Manifest upload duplicates key value violates unique constraint.

Case can be seen in report portal.

Actual results:
Failed uploading manifest

Expected results:
Successfully uploads manifest

Additional info:

E nailgun.entity_mixins.TaskFailedError: Task fc7b8f24-c40a-4651-8364-065b296f8363 did not succeed. Task information: {'id': 'fc7b8f24-c40a-4651-8364-065b296f8363', 'label': 'Actions::Katello::Organization::ManifestImport', 'pending': False, 'action': "Import Manifest organization 'zgiNat'", 'username': 'admin', 'started_at': '2019-03-03 23:07:39 UTC', 'ended_at': '2019-03-03 23:07:53 UTC', 'state': 'stopped', 'result': 'warning', 'progress': 1.0, 'input': {'organization': {'id': 12, 'name': 'zgiNat', 'label': 'zgiNat'}, 'remote_user': 'admin', 'remote_cp_user': 'admin', 'current_timezone': 'UTC', 'current_user_id': 4, 'current_organization_id': 12, 'current_location_id': None}, 'output': {}, 'humanized': {'action': 'Import Manifest', 'input': [['organization', {'text': "organization 'zgiNat'", 'link': '/organizations/12/edit'}]], 'output': '', 'errors': ['PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_pools_on_cp_id"\nDETAIL: Key (cp_id)=(8a88400369450d7b016945d026080c79) already exists.\n: INSERT INTO "katello_pools" ("cp_id", "created_at", "updated_at", "organization_id") VALUES ($1, $2, $3, $4) RETURNING "id"']}, 'cli_example': None}


Related issues

Related to Katello - Bug #25981: Manifest upload task takes too much timeClosed

Associated revisions

Revision c71a605e (diff)
Added by Justin Sherrill over 1 year ago

Fixes #26412 - retry cp object creation on conflict

This works around a race condition when a pool creation occurs
both as part of manifest import and as part of cp event listener

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8034 added

#2 Updated by Jonathon Turel over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.12.0
  • Subject changed from manifest upload duplicate key value violates unique constraint to manifest upload duplicate key value violates unique constraint

#3 Updated by Justin Sherrill over 1 year ago

  • Related to Bug #25981: Manifest upload task takes too much time added

#4 Updated by Justin Sherrill over 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF