Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-37171

Add proper steps for upgrading external postgres from 12 to 13 in satellite upgrade from 6.15 to 6.16 document.

XMLWordPrintable

    • None
    • None
    • None
    • None

      DESCRIPTION:

      The steps for upgrading external postgresql are not clear in Satellite upgrade document, instead it redirects to RHEL document:

      Satellite Doc:
      https://docs.redhat.com/en/documentation/red_hat_satellite/6.16/html/upgrading_connected_red_hat_satellite_to_6.16/upgrading_satellite_upgrading-connected#Upgrading_the_External_Database_upgrading-connected

       

      RHEL doc:
      https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/using-databases#fast-upgrade-using-the-pg_upgrade-tool_migrating-to-a-rhel-8-version-of-postgresql

      CUSTOMER REQUIREMENT:

            - The steps should be clear with the command to execute on the Satellite server to perform the upgrade instead of redirecting to the RHEL document and scrolling up and down.

      STEPS FAILING:

       

        # yum module enable postgresql:13
        # yum install postgresql-server postgresql-upgrade
      

       

      Fails with error:

      # yum module enable postgresql:13
      Updating Subscription Management repositories.
      Last metadata expiration check: 1:15:45 ago on Sat 26 Jul 2025 06:20:10 PM EDT.
      Error: Problems in request:
      Modular dependency problems:
       Problem 1: module satellite:el8:61520241014154006:c57b2cc6.x86_64 from satellite-6.15-for-rhel-8-x86_64-rpms requires module(postgresql:12), but none of the providers can be installed
        - module postgresql:12:8090020240209130909:a75119d5.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(postgresql:13) provided by postgresql:13:8100020241122084628:489197e6.x86_64 from rhel-8-for-x86_64-appstream-rpms
        - module postgresql:13:8100020241122084628:489197e6.x86_64 from rhel-8-for-x86_64-appstream-rpms conflicts with module(postgresql:12) provided by postgresql:12:8050020210715095825:b4937e53.x86_64 from rhel-8-for-x86_64-appstream-rpms
      

       

      The rest of the steps from the above-shared RHEL Doc.

      • # systemctl stop postgresql.service
      • # postgresql-setup --upgrade
      • # systemctl start postgresql.service
      • # systemctl status postgresql.service
      • # su postgres -c '~/analyze_new_cluster.sh'
      • # systemctl enable postgresql.service

      RESOLUTION:

      • Backup the postgresql.conf and pg_hba.conf configs of postgres [ specifically keep a note of satellite-relevant bits] on the external db host.
      • Instead of enabling the module, use the switch-to module command with:
            # dnf module switch-to postgresql:13
      • Rest of the commands can be followed from the RHEL doc mentioned above. It helps upgrade the external DB server.
      • Once external db upgrade is done, make sure to add back required config changes on external DB in /varlib/pgsql/data/ directory in the file ‘postgresql.conf’, and ‘pg_hba.conf’, so that satellite can talk to it.
      • Fix the evr extension as per Satellite Doc, by running the following command to correct the permissions on the evr extension on the external database:
      # runuser -l postgres -c \
      "psql -d foreman -c \"UPDATE pg_extension SET extowner = (SELECT oid FROM pg_authid WHERE rolname='foreman') WHERE extname='evr';\""
      

      ADDITIONAL STEPS:

      • Postgresql 13 uses scram-sha-256 instead of md5 as password hash. So, we should add the steps to update the postgresql password hash from md5 to scram-sha-256 for the external DB server in Satellite Doc.
      • Also, add the steps to update passwords for foreman, pulp, and candlepin users in external db.

              rhn-support-agadhave Akshay Gadhave
              rhn-support-ashipati Ashish Patil
              Leos Stejskal Leos Stejskal
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: