Bug 1208141 - Satellite upgrade from 5.4.1 to 5.7 fails if another user is UID 26 instead of "postgres"
Summary: Satellite upgrade from 5.4.1 to 5.7 fails if another user is UID 26 instead o...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 570
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat570-triage
TreeView+ depends on / blocked
 
Reported: 2015-04-01 13:45 UTC by Dylan Gross
Modified: 2019-09-12 08:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-02 15:48:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1399743 0 None None None Never
oVirt gerrit 65230 0 master MERGED api: Speed up schema loading 2020-09-17 03:12:58 UTC
oVirt gerrit 65274 0 ovirt-4.0 MERGED api: Speed up schema loading 2020-09-17 03:12:58 UTC

Description Dylan Gross 2015-04-01 13:45:53 UTC
Description of problem:

Upgrading from Red Hat Satellite v5.4.1 to Red Hat Satellite 5.7.  Another user existed in /etc/passwd with the UID 26 and another group existed in /etc/group with GID 26.

During the upgrade, the postgres id is added as UID 26 regardless of whether something is already using it.

    # id prngd
    uid=26(prngd) gid=53(prngd) groups=53(prngd),43(nologin)

    # id postgres
    uid=26(prngd) gid=26(filemgr) groups=53(prngd)

This results in incorrect roles being set up in the postgres database.


Version-Release number of selected component (if applicable):

   Upgrade attempted from 5.4.1 to 5.7
   However, I would suspect this happens going from any version using embedded Oracle to any version using embedded PostgreSQL

How reproducible:


Steps to Reproduce:
1.  Create another user with UID 26 prior to attempting an upgrade
2.  Attempt an upgrade from 5.4.1 to 5.7
3.

Actual results:

install.pl fails to successfully create the postgres DB

# ./install.pl --upgrade --skip-selinux-test
* Starting Red Hat Satellite installer.
* Performing pre-install checks.
* Pre-install checks complete.  Beginning installation.
* RHN Registration.
** Registration: System is already registered with RHN.  Not re-registering.
* Upgrade flag passed.  Stopping necessary services.
* Purging conflicting packages.
* Checking for uninstalled prerequisites.
* Installing RHN packages.
* Now running spacewalk-setup.
** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: #############

Could not install database.

# tailf /var/log/rhn/install_db.log
createdb: could not connect to database postgres: FATAL:  no pg_hba.conf entry for host "[local]", user "prngd", database "postgres", SSL off
logout


Expected results:

Perhaps either a pre-check in the install would exit early if it detects another user using UID 26 or GID 26.   

Or maybe a warning message in the /etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates output.

Also, perhaps a modification to the Installation Guide - Upgrade Requirements section.    https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Installation_Guide/index.html#Upgrade_Requirements

Additional info:

Comment 1 Marcel Wysocki 2015-04-24 19:58:05 UTC
is an upgrade from 5.4.1 to 5.7 even supported or so i need the steps in between too ?

Comment 2 Tomas Lestach 2017-02-02 15:48:18 UTC
I feel like this is more a postgresql bug, not a Satellite 5 bug.
I'm closing this BZ CANTFIX. Feel free to open a bug against postgresql if needed.


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