Project

General

Profile

Bug #23945

SQL error when adding some puppet modules to CV: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_cv_puppet_modules_name"

Added by Stephen Benjamin about 3 years ago. Updated about 3 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1585408

Description of problem:
SQL error when adding some puppet modules to CV: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_cv_puppet_modules_name"

Version-Release number of selected component (if applicable):
satellite-6.4.0-9.beta.el7sat.noarch
tfm-rubygem-hammer_cli-0.13.0-1.el7sat.noarch

How reproducible:
happens for about 20% of modules

Steps to Reproduce:
1. Sync whole PuppetForge, create content view "MyCV"
2. # hammer --csv -u admin -p changeme puppet-module list \
> puppet-module-list.csv
3. # for u in $( cut -d ',' -f 5 puppet-module-list.csv ); do
hammer -u admin -p changeme content-view puppet-module add \
--content-view "MyCV" --organization "Default Organization" \
--uuid "$u"
done

Actual results:
Could not add the puppet module:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_cv_puppet_modules_name"
DETAIL: Key (name, content_view_id)=(sumo, 7) already exists.
: INSERT INTO "katello_content_view_puppet_modules" ("content_view_id", "name", "author", "uuid", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"

Expected results:
Either should work or should provide some user friendly message

Associated revisions

Revision 403f7d48 (diff)
Added by Stephen Benjamin about 3 years ago

fixes #23945 - check for duplicate puppet module name in CV

History

#1 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Stephen Benjamin
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7456 added

#2 Updated by Stephen Benjamin about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#3 Updated by Jonathon Turel about 3 years ago

  • Legacy Backlogs Release (now unused) set to 338
  • Subject changed from SQL error when adding some puppet modules to CV: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_cv_puppet_modules_name" to SQL error when adding some puppet modules to CV: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_cv_puppet_modules_name"

Also available in: Atom PDF