Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1660646 - UUID error on syncing repo with module errata
Summary: UUID error on syncing repo with module errata
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Released
Assignee: Partha Aji
QA Contact: vijsingh
URL:
Whiteboard:
: 1698192 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-18 21:50 UTC by Partha Aji
Modified: 2019-10-07 17:17 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-katello-3.10.0.45-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 19:57:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25676 0 None None None 2018-12-18 21:52:20 UTC

Description Partha Aji 2018-12-18 21:50:20 UTC
Sync a repo with module errata but missing module definition (https://partha.fedorapeople.org/test-repos/rpm-with-modules-el8-missing-modules/).
During indexing of the errata Katello tries to create a ModuleStream if it cant find the module listed in the errata.
During the creation of that module stream if that module does not exist in Pulp we get a non null violation.

"""
[[0m|675c0] PG::NotNullViolation: ERROR:  null value in column "uuid" violates not-null constraint
 | DETAIL:  Failing row contains (9, duck, null, 201809302113907, deadbeef, 0, noarch, 2018-12-11 23:25:08.111841, 2018-12-11 23:25:08.111841, null, null).
 | : INSERT INTO "katello_module_streams" ("name", "version", "context", "stream", "arch", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" (ActiveRecord::NotNullViolation)
"""

Steps:
1) Sync https://partha.fedorapeople.org/test-repos/rpm-with-modules-el8-missing-modules/

Expected:
Successful sync with the missing duck:0.9 module ignored

Actual
"""
[[0m|675c0] PG::NotNullViolation: ERROR:  null value in column "uuid" violates not-null constraint
 | DETAIL:  Failing row contains (9, duck, null, 201809302113907, deadbeef, 0, noarch, 2018-12-11 23:25:08.111841, 2018-12-11 23:25:08.111841, null, null).
 | : INSERT INTO "katello_module_streams" ("name", "version", "context", "stream", "arch", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" (ActiveRecord::NotNullViolation)

 | /home/vagrant/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.1/lib/active_record/relation.rb:108:in `first_or_create!'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:221:in `block (2 levels) in update_modules'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:218:in `each'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:218:in `block in update_modules'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:162:in `run_until'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:244:in `update_modules'
 | /home/vagrant/git/katello/app/models/katello/erratum.rb:122:in `update_from_json'
 | /home/vagrant/git/katello/app/models/katello/concerns/pulp_database_unit.rb:57:in `block (2 levels) in import_all'

""""

Comment 3 Partha Aji 2018-12-18 21:52:20 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25676 from this bug

Comment 4 Satellite Program 2018-12-18 23:03:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25676 has been resolved.

Comment 5 Brad Buckingham 2019-04-09 19:44:16 UTC
*** Bug 1698192 has been marked as a duplicate of this bug. ***

Comment 8 vijsingh 2019-04-17 08:11:06 UTC
ON_QA Verified

@Satellite 6.5.0 snap 24.0

Steps:

 Created and synced repo using :https://partha.fedorapeople.org/test-repos/rpm-with-modules-el8-missing-modules/

Observation:
 
 Successful sync with the missing duck:0.9 module and module duck:0.9 ignored/not synced.

Comment 10 Bryan Kearney 2019-05-14 19:57:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.