Bug 2166744 - Locale change caused by RHEL upgrade results in database index corruption "get() returned more than one Modulemd -- it returned 2!"
Summary: Locale change caused by RHEL upgrade results in database index corruption "ge...
Keywords:
Status: CLOSED DUPLICATE of bug 2161929
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.11.3
Hardware: x86_64
OS: Linux
urgent
unspecified
Target Milestone: Unspecified
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-02 20:38 UTC by Odilon Sousa
Modified: 2023-02-09 19:02 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2161929
Environment:
Last Closed: 2023-02-08 15:00:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35966 0 Urgent Closed Locale change caused by RHEL upgrade results in database index corruption "get() returned more than one Modulemd -- it r... 2023-02-02 20:38:50 UTC
Red Hat Issue Tracker SAT-15631 0 None None None 2023-02-02 20:39:42 UTC

Description Odilon Sousa 2023-02-02 20:38:35 UTC
+++ This bug was initially created as a clone of Bug #2161929 +++

This is a clone for Foreman Maintain, as that needs to perform the reindexing in the case of a DB restore of a EL7 backup on EL8!


+++ This bug was initially created as a clone of Bug #2142270 +++

Description of problem:
----------------------

Repository synchronization on Red Hat Satellite 6.11.3 on RHEL-8 fails with the following error :

Katello::Errors::Pulp3Error "get() returned more than one Modulemd -- it returned 2!"




Error:
Katello::Errors::Pulp3Error
get() returned more than one Modulemd -- it returned 2!


It seems to be related to the locales change in glibc-2.28 causing the collation changed in Postgresql
--------------
https://dba.stackexchange.com/questions/268027/postgresql-duplicates-despite-having-a-unique-constraint
https://wiki.postgresql.org/wiki/Locale_data_changes
https://postgresql.verite.pro/blog/2018/08/27/glibc-upgrade.html
-------------


I checked 3 cases attached to this bugzilla. They are running Satellite on RHEL 8 which having glibc-2.28.

Looking at the pulp_created column in core_content, the duplicated records were also created after the release date of Satellite 6.11.

It seems like we will need to reindex all the tables to avoid the issue after upgrading the OS to RHEL 8.

--- Additional comment from  on 2023-01-18T11:00:19Z 

Created redmine issue https://projects.theforeman.org/issues/35966 from this bug

Comment 2 Odilon Sousa 2023-02-08 15:00:36 UTC

*** 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.