Chapter 5. Upgrading the undercloud operating system 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 Log in to the undercloud as the stack user. Disable the main OpenStack services on the undercloud: Remove the main OpenStack services from the undercloud, except OpenvSwitch and certain Python 2 packages that are required for the upgrade: Remove the content from the /etc/httpd and /var/lib/docker directories: 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 Before you install and run Leapp, ensure that you have familiarized yourself with the Section 2.4, "Leapp upgrade usage in Red Hat OpenStack Platform" section. Before you perform the Leapp upgrade, ensure that you complete the Section 4.3, "Using predictable NIC names for the undercloud node" section. 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. Procedure Log in to the undercloud as the stack user. Install the Leapp utility and jq: 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. 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: 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. Note The content view that you create for Red Hat OpenStack Platform 16.2 must contain content for Red Hat Enterprise Linux 8.4. 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: Retain the Red Hat Ceph Storage 3 version of ceph-ansible through the upgrade with the to_keep transaction file: Adjust the kernel modules that are no longer supported in RHEL 8: USD 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 "/^USD{module}USD/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 == \"USD{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 Remove the pam_pkcs11 module: 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: For more information about authentication configuration during the Leapp upgrade process, see Known issues in Upgrading from RHEL 7 to RHEL 8 . 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 : You must use the LEAPP_UNSUPPORTED environment variable every time you use a environment variable with the LEAPP_DEVEL prefix. 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" . USD sudo rm -f /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/persistentnetnamesdisable/actor.py Start the Leapp upgrade process: USD 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. Wait for the leapp upgrade command to successfully complete. Create an empty .autorelabel file in your root directory: After a reboot, SELinux detects this file and automatically relabels the file system. Reboot the undercloud: Remove the Leapp packages from the transaction exclusion that is defined in the DNF configuration: USD sudo dnf config-manager --save --setopt exclude='' Additional resources Data required by the Leapp utility for an in-place upgrade from RHEL 7 to RHEL 8 How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7 Performing the upgrade from RHEL 7 to RHEL 8 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 Log in to the undercloud host as the stack user. Source the stackrc undercloud credentials file: 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

Commands:
sudo systemctl stop 'openstack-*' httpd haproxy mariadb 'rabbitmq*' docker xinetd
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
sudo rm -rf /etc/httpd /var/lib/docker
sudo yum install leapp sudo yum install jq
sudo subscription-manager refresh
sudo subscription-manager register --force --org ORG --activationkey ACTIVATION_KEY
echo 'openvswitch2.11' | sudo tee -a /etc/leapp/transaction/to_remove echo 'openvswitch2.15' | sudo tee -a /etc/leapp/transaction/to_install
echo 'ceph-ansible' | sudo tee -a /etc/leapp/transaction/to_keep
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 "/^USD{module}USD/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 == \"USD{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
sudo leapp answer --add --section remove_pam_pkcs11_module_check.confirm=True
sudo leapp answer --add --section authselect_check.confirm=True
export LEAPP_UNSUPPORTED=1 export LEAPP_DEVEL_TARGET_RELEASE=8.4
sudo rm -f /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/persistentnetnamesdisable/actor.py
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
sudo touch /.autorelabel
sudo reboot
sudo dnf config-manager --save --setopt exclude=''
source ~/stackrc
BaseTripleoPackages: - jq - lvm2 - net-snmp - openstack-selinux - os-net-config - puppet-tripleo - python3-heat-agent* - python3-openstackclient