Search

Chapter 5. Upgrading the undercloud operating system

download PDF

Before you upgrade director, you must upgrade the undercloud operating system from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8. As a part of this operating system upgrade, you must remove the Red Hat OpenStack Platform 13 packages and then run the Leapp utility to upgrade the system packages. This package removal and operating system upgrade does not affect the undercloud database. After you complete the operating system upgrade, reinstall the Red Hat OpenStack Platform 16.2 versions of the director packages.

5.1. Removing Red Hat OpenStack Platform director packages

Before you run the Leapp utility, remove the Red Hat OpenStack Platform 13 packages tied to Red Hat Enterprise Linux 7. These package names use a release suffix of el7ost. Some el7ost remain on the system as dependencies for subscription-manager and the Leapp utility.

Procedure

  1. Log in to the undercloud as the stack user.
  2. Disable the main OpenStack services on the undercloud:

    $ sudo systemctl stop 'openstack-*' httpd haproxy mariadb 'rabbitmq*' docker xinetd
  3. Remove the main OpenStack services from the undercloud, except OpenvSwitch and certain Python 2 packages that are required for the upgrade:

    $ sudo yum -y remove '*el7ost*' 'galera*' 'haproxy*' \
        httpd 'mysql*' 'pacemaker*' xinetd python-jsonpointer \
        qemu-kvm-common-rhev qemu-img-rhev 'rabbit*' \
        'redis*' \
        -- \
        -'*openvswitch*' -python-docker -python-PyMySQL \
        -python-pysocks -python2-asn1crypto -python2-babel \
        -python2-cffi -python2-cryptography -python2-dateutil \
        -python2-idna -python2-ipaddress -python2-jinja2 \
        -python2-jsonpatch -python2-markupsafe -python2-pyOpenSSL \
        -python2-requests -python2-six -python2-urllib3 \
        -python-httplib2 -python-passlib -python2-netaddr -ceph-ansible
  4. Remove the content from the /etc/httpd and /var/lib/docker directories:

    $ sudo rm -rf /etc/httpd /var/lib/docker

5.2. Performing a Leapp upgrade on the undercloud

Install and run the Leapp utility to upgrade the operating system to Red Hat Enterprise Linux (RHEL) 8.

Prerequisites

Procedure

  1. Log in to the undercloud as the stack user.
  2. Install the Leapp utility and jq:

    $ sudo yum install leapp
    $ sudo yum install jq
  3. Download the additional required data files (RPM package changes and RPM repository mapping) attached to the Knowledge Base article Data required by the Leapp utility for an in-place upgrade from RHEL 7 to RHEL 8 and place these files in the /etc/leapp/files/ directory.
  4. Update your Red Hat subscription:

    • If your undercloud uses the Red Hat Customer Portal for registration, refresh your current subscription to obtain access to the Red Hat Enterprise Linux 8.4 content:

      $ sudo subscription-manager refresh
    • If your undercloud uses Red Hat Satellite Server for registration, re-register the undercloud to a content view associated with your Red Hat OpenStack Platform (RHOSP)16.2 activation key.

      $ sudo subscription-manager register --force --org ORG --activationkey ACTIVATION_KEY
      Note

      The content view that you create for Red Hat OpenStack Platform 16.2 must contain content for Red Hat Enterprise Linux 8.4.

  5. Red Hat OpenStack Platform 16.2 uses a newer version of Open vSwitch`. Substitute the Open vSwitch version through the to_remove and to_install transaction files:

    $ echo 'openvswitch2.11' | sudo tee -a /etc/leapp/transaction/to_remove
    $ echo 'openvswitch2.15' | sudo tee -a /etc/leapp/transaction/to_install
  6. Retain the Red Hat Ceph Storage 3 version of ceph-ansible through the upgrade with the to_keep transaction file:

    $ echo 'ceph-ansible' | sudo tee -a /etc/leapp/transaction/to_keep
  7. Adjust the kernel modules that are no longer supported in RHEL 8:

    $ if [ -f /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/kernel/checkkerneldrivers/files/removed_drivers.txt ]; then
        for module in pata_acpi floppy; do
            sudo sed -i "/^${module}$/d" /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/kernel/checkkerneldrivers/files/removed_drivers.txt
        done
    else
        for module in pata_acpi floppy; do
            jq ". | del(.data[] | select(.driver_name == \"${module}\"))" /etc/leapp/files/device_driver_deprecation_data.json | sudo tee /etc/leapp/files/device_driver_deprecation_data.json_modified
            mv /etc/leapp/files/device_driver_deprecation_data.json_modified /etc/leapp/files/device_driver_deprecation_data.json
        done
    fi
  8. Remove the pam_pkcs11 module:

    $ sudo leapp answer --add --section remove_pam_pkcs11_module_check.confirm=True
  9. Optional: If your environment is deployed with a TLS-Everywhere architecture and it uses the deprecated authconfig utility to configure authentication on your system, configure your RHEL 8 system with the authselect utility:

    $ sudo leapp answer --add --section authselect_check.confirm=True

    For more information about authentication configuration during the Leapp upgrade process, see Known issues in Upgrading from RHEL 7 to RHEL 8.

  10. Set the LEAPP_DEVEL_TARGET_RELEASE and LEAPP_UNSUPPORTED environment variables to specify the RHEL 8 minor version that you want to upgrade to. For RHOSP 16.2, you must set the RHEL 8 minor version to 8.4:

    $ export LEAPP_UNSUPPORTED=1
    $ export LEAPP_DEVEL_TARGET_RELEASE=8.4

    You must use the LEAPP_UNSUPPORTED environment variable every time you use a environment variable with the LEAPP_DEVEL prefix.

  11. Remove the persistent network names actor from the Leapp process:

    Note

    If you do not rename the network interface names before you perform the Leapp upgrade process, the interface names might change after the upgrade to RHEL 8.2 is complete. For more information about renaming the network interface names, see Section 4.3, “Using predictable NIC names for the undercloud node”.

    $ sudo rm -f /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/persistentnetnamesdisable/actor.py
  12. Start the Leapp upgrade process:

    $ sudo -E leapp upgrade --debug --enablerepo rhel-8-for-x86_64-baseos-eus-rpms --enablerepo rhel-8-for-x86_64-appstream-eus-rpms --enablerepo fast-datapath-for-rhel-8-x86_64-rpms --enablerepo ansible-2.9-for-rhel-8-x86_64-rpms

    Use the --enablerepo option to set the repositories that you want to enable during the Leapp upgrade process. You must include these repositories to facilitate the Red Hat OpenStack Platform 16.2 transition, especially with the newer version of Open vSwitch.

  13. Wait for the leapp upgrade command to successfully complete.
  14. Create an empty .autorelabel file in your root directory:

    $ sudo touch /.autorelabel

    After a reboot, SELinux detects this file and automatically relabels the file system.

  15. Reboot the undercloud:

    $ sudo reboot
  16. Remove the Leapp packages from the transaction exclusion that is defined in the DNF configuration:

    $ sudo dnf config-manager --save --setopt exclude=''

5.3. Customizing the base packages after a Leapp upgrade

You can specify additional packages to install after you upgrade your host from Red Hat Enterprise Linux (RHEL) 7.9 to RHEL 8.4. You can customize your base packages on specific roles by using the BaseTripleoPackages variable.

For example, after you upgrade a Ceph Storage node to RHEL 8.4, the python3-openstackclient package is no longer required. However, if your deployment requires this package, you can include it in the BaseTripleoPackages variable in your custom template.

Procedure

  1. Log in to the undercloud host as the stack user.
  2. Source the stackrc undercloud credentials file:

    $ source ~/stackrc
  3. In your custom template, add the BaseTripleoPackages variable to include additional packages in your deployment. For example:

    BaseTripleoPackages:
    - jq
    - lvm2
    - net-snmp
    - openstack-selinux
    - os-net-config
    - puppet-tripleo
    - python3-heat-agent*
    - python3-openstackclient
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.