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 2172655 - when running reindex on foremandb issue with duplicates on katello_erratum_packages table
Summary: when running reindex on foremandb issue with duplicates on katello_erratum_pa...
Keywords:
Status: CLOSED DUPLICATE of bug 2161929
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.12.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-22 21:34 UTC by Paul Dudley
Modified: 2023-11-17 13:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-10 21:00:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-16116 0 None None None 2023-02-23 15:15:36 UTC

Description Paul Dudley 2023-02-22 21:34:25 UTC
Satellite 6.12.2 running a reindexdb on foreman retrieves;
~~~
DEBUG:  building index "katello_erratum_packages_eid_nvrea_n_f" on table "katello_erratum_packages" with request for 1 parallel worker
reindexdb: error: reindexing of database "foreman" failed: ERROR:  could not create unique index "katello_erratum_packages_eid_nvrea_n_f"
DETAIL:  Key (erratum_id, nvrea, name, filename)=(61289, libpmemobj++-devel-1.4-3.el7.x86_64, libpmemobj++-devel, libpmemobj++-devel-1.4-3.el7.x86_64.rpm) is duplicated.
~~~

The duplicates are numerous, as well;
~~~
[root@satellite ~]# echo "select erratum_id, filename, count(*) from katello_erratum_packages group by erratum_id, filename having count(*) > 1;" | sudo -u postgres psql foreman | tail
could not change directory to "/root": Permission denied
      62723 | gcc-objc++-4.8.5-16.el7.x86_64.rpm                     |     2
      62723 | gcc-objc-4.8.5-16.el7.x86_64.rpm                       |     2
      62772 | gcc-objc++-4.8.5-16.el7_4.2.x86_64.rpm                 |     2
      63154 | libpmemobj++-devel-1.2.1-4.el7.x86_64.rpm              |     2
      63248 | gcc-objc-4.8.5-28.el7.x86_64.rpm                       |     2
      63299 | gcc-objc++-4.8.5-4.el7.x86_64.rpm                      |     2
      63546 | gcc-objc++-4.8.2-16.2.el7_0.x86_64.rpm                 |     2
      63546 | gcc-objc-4.8.2-16.2.el7_0.x86_64.rpm                   |     2
(83 rows)
~~~

It seems like this is perhaps limited to 6.12.2 but no confirmation there yet.

Comment 1 Brad Buckingham 2023-02-23 15:14:29 UTC
Hi Paul,

Thanks for raising.  Can you provide the reproducer steps?

Comment 2 Paul Dudley 2023-02-23 15:20:59 UTC
Brad,

Thanks. I've tried yesterday to reproduce on a 6.12 system that had been upgraded from at least 6.10 and failed to reproduce it. I'm still trying to look into root cause for this. So far we have at least one customer case and I have an internal Satellite with this issue which I can provide for troubleshooting if that helps, or DB dumps as well if that can help. If I stumble on more info here I will update the bz.

Thanks
Paul

Comment 8 Ian Ballou 2023-04-10 21:00:44 UTC
Closing this as a duplicate -- please reopen this issue if it's found to not be caused by the LEAPP upgrade.

*** This bug has been marked as a duplicate of bug 2161929 ***


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