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 Copy linkLink copied to clipboard!
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
stackuser. Disable the main OpenStack services on the undercloud:
$ sudo systemctl stop 'openstack-*' httpd haproxy mariadb 'rabbitmq*' docker xinetdRemove 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-ansibleRemove the content from the
/etc/httpdand/var/lib/dockerdirectories:$ sudo rm -rf /etc/httpd /var/lib/docker
5.2. Performing a Leapp upgrade on the undercloud Copy linkLink copied to clipboard!
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
stackuser. Install the Leapp utility and jq:
$ sudo yum install leapp $ sudo yum install 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:
$ sudo subscription-manager refreshIf 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_KEYNoteThe 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_removeandto_installtransaction files:$ echo 'openvswitch2.11' | sudo tee -a /etc/leapp/transaction/to_remove $ echo 'openvswitch2.15' | sudo tee -a /etc/leapp/transaction/to_installRetain the Red Hat Ceph Storage 3 version of
ceph-ansiblethrough the upgrade with theto_keeptransaction file:$ echo 'ceph-ansible' | sudo tee -a /etc/leapp/transaction/to_keepAdjust 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 fiRemove the
pam_pkcs11module:$ sudo leapp answer --add --section remove_pam_pkcs11_module_check.confirm=TrueOptional: If your environment is deployed with a TLS-Everywhere architecture and it uses the deprecated
authconfigutility to configure authentication on your system, configure your RHEL 8 system with theauthselectutility:$ sudo leapp answer --add --section authselect_check.confirm=TrueFor 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_RELEASEandLEAPP_UNSUPPORTEDenvironment 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 to8.4:$ export LEAPP_UNSUPPORTED=1 $ export LEAPP_DEVEL_TARGET_RELEASE=8.4You must use the
LEAPP_UNSUPPORTEDenvironment variable every time you use a environment variable with theLEAPP_DEVELprefix.Remove the persistent network names actor from the Leapp process:
NoteIf 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.pyStart 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-rpmsUse the
--enablerepooption 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 upgradecommand to successfully complete. Create an empty
.autorelabelfile in your root directory:$ sudo touch /.autorelabelAfter a reboot, SELinux detects this file and automatically relabels the file system.
Reboot the undercloud:
$ sudo rebootRemove 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 Copy linkLink copied to clipboard!
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
stackuser. Source the
stackrcundercloud credentials file:$ source ~/stackrcIn your custom template, add the
BaseTripleoPackagesvariable 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