4 Completing Postupgrade Tasks

Important:

The following tasks aren't comprehensive. Depending on the setup, you might need to perform other procedures to return the newly upgraded system back into operation. Review the /var/log/leapp/leapp-report.txt that's generated after the upgrade. This report might contain more recommendations to ensure that the upgraded system remains in a supported state.

  1. Configured the python version.
    sudo alternatives --set python /usr/bin/python3
  2. Enable the firewall.

    sudo systemctl start firewalld
    sudo systemctl enable firewalld
  3. Check that the network connections are operational, for example, by log in to the system by using SSH.

  4. If you have an instance managed by Oracle OS Management Service, do the following:
    1. From Oracle Cloud Infrastructure, open the navigation menu and click Compute. Under Compute, click Instances.
    2. Select the instance you upgraded from Oracle Linux 7 to Oracle Linux 8.
    3. From the Resources section, click OS Management.
    4. From the Overview tab, click the horizontal ellipsis (...) and select View OS Management Details.
    5. From the Resources area, select Software Sources.
    6. Remove all Oracle Linux 7 sources. Select Select All then click Remove.
    7. Add the Oracle Linux 8 Base OS Latest software source. This becomes the software source for the upgraded managed instance.
    8. Add any other required software sources.

    Note:

    The Oracle OS Management Service can take some time to become aware of the changes to the managed instance Oracle Linux version. For example, sometimes this might take between 10 to 20 minutes.

    Also, the following error messages might appear in the /var/log/oracle-cloud-agent/plugins/osms/agent.log after upgrading an instance being managed by the Oracle OS Management Service.
    2024-03-26 11:42:54,555 - INFO - gRPC Start: OSMS Agent service started
    2024-03-26 11:42:54,569 - ERROR - Error checking actions (next check in 240 seconds): [Errno 2] No such file or directory: 'osms': 'osms'

    These error messages are resolved after running the sudo alternatives --set python /usr/bin/python3 command in step 1.

  5. If you had yum customizations before the upgrade, restore them in the upgraded system's /etc/dnf/dnf.conf file, for example:

    proxy=proxy-url:port
  6. On upgraded Oracle Linux 7 instances on Oracle Cloud Infrastructure, update the script to avoid losing SSH connectivity.

    1. Use a text editor to open a new /etc/dhcp/exit-hooks.d/dhclient-exit-hook-set-hostname.sh-ol8 file.

    2. Add to this script the contents as provided in Updated dhclient Script.

    3. Replace the current dhclient-exit-hook script with the updated file that you created. Type:

      sudo cp /etc/dhcp/exit-hooks.d/dhclient-exit-hook-set-hostname.sh-ol8 /etc/dhcp/exit-hooks.d/dhclient-exit-hook-set-hostname.sh
  7. Restore network mounted file systems that you unmounted before the upgrade. See File Systems and Storage Issues.

  8. Confirm the Python installation.

    Significant differences exist in how Python is used in Oracle Linux 8. Notably, you need to explicitly select the Python version that you're using. Further, if you have installed third-party libraries by using pip, you might need to manually clean and reinstall these libraries as required. For more information, see Oracle Linux 8: Installing and Managing Python.

  9. If upgrading KVM hosts, restart the KVM virtual machines.
    sudo virsh start vm-name
  10. Set SELinux to run in Enforcing mode.

    During the upgrade, the Leapp utility sets SELinux to run in Permissive mode. To restore the setting: To revert to Enforcing mode and verify the setting, type:

    sudo setenforce enforcing

    You can verify the mode of SELinux as follows:

    getenforce
    Enforcing

    To make this setting persist across system reboots, add the following line to /etc/selinux/config:

    SELINUX=enforcing
  11. Reevaluate then reapply the security policies such as setting cryptographic policies.

    If you disabled Secure Boot during the preparation steps, reenable it in the system's firmware that you access at boot time.

  12. Inspect the system for unneeded configurations and files.

    Note:

    Some of these unneeded files might be reported in the generated /var/log/leapp/leapp-report.txt after the upgrade. Ensure that you review this report and complete its post upgrade recommendations.

    This step aims to ensure that the configurations are consistent with the new OS version. The completion of this step would vary, depending on what you deem is important to retain from the previous system's state. Consider the following guidelines:

    • Remove kernels and kernel modules that are no longer applicable. For example, if the system uses the Btrfs file system, then you can only use the UEK kernel. Therefore, consider removing the RHCK kernel and any earlier versions of the UEK kernel. Also, you can also rebuild the rescue kernel.

    • If you remove kernels, you might also need to update the GRUB menu so that the menu options only reflect the actual kernels on the system.

    • Review /etc/yum.repos.d for entries that might need to be addressed, such as customized repositories.

      For example, during system updates, *.rpmnew files might be created to prevent overwriting corresponding existing *.rpm files. You would need to use the contents of the *.rpmnew files to guide you when changing the corresponding *.rpm files.

    • Remove residual packages from the previous Oracle Linux version.
      1. Edit /etc/dnf/dnf.conf by removing or commenting out exclude= lines that refer to leapp packages, for example:
        #exclude=python2-leapp,snactor,leapp-upgrade-el7toel8,leapp
      2. Use commands such as rpm -qa to list packages that can be removed.
        rpm -qa | grep el7
        rpm -qa | grep leapp
      3. Use the sudo dnf remove command to remove the packages listed by the queries.

    Caution:

    Residual el7 packages that remain on the system do not receive updates. Vulnerability scanners or other security audits might report warnings or failures about these packages.

  13. Remove the /root/tmp_leapp_py3 directory, which is no longer needed.

  14. If you removed the system from ULN to perform the upgrade, register the system again and configure the appropriate channels.

    For more information, see Registering an Oracle Linux System With ULN and ULN Channel Subscription Management in Oracle Linux: Managing Software on Oracle Linux.