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.
- Configure the python
version.
sudo alternatives --set python /usr/bin/python3
-
Enable the firewall.
sudo systemctl start firewalld sudo systemctl enable firewalld
-
Check that the network connections are operational, for example, by log in to the system by using SSH.
- If you have an instance managed by Oracle OS Management Service, do the
following:
- From Oracle Cloud Infrastructure, open the navigation menu and click Compute. Under Compute, click Instances.
- Select the instance you upgraded from Oracle Linux 7 to Oracle Linux 8.
- From the Resources section, click OS Management.
- From the Overview tab, click the horizontal ellipsis (...) and select View OS Management Details.
- From the Resources area, select Software Sources.
- Remove all Oracle Linux 7 sources. Select Select All then click Remove.
- Add the Oracle Linux 8 Base OS Latest software source. This becomes the software source for the upgraded managed instance.
- 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. - If you have an instance managed by Oracle OS Management Hub, attach required software
sources for Oracle Linux
8. For more information about managing
software sources, see https://docs.oracle.com/en-us/iaas/osmh/doc/software-sources.htm.
Note:
The Oracle OS Management Hub can take some time to become aware of the changes to the managed instance Oracle Linux version.
Also, before you perform this step, repositories that Leapp used to perform the upgrade remain enabled including Oracle Linux 7 and Oracle Linux 8 repositories. After performing this step, only those repositories you configure using OS Management Hub are enabled.
- If you have an instance managed by Oracle Autonomous Linux, attach all
mandatory software sources for Oracle Linux
8. For more information about managing software sources, see https://docs.oracle.com/en-us/iaas/autonomous-linux/doc/software-sources.htm.
Note:
The Oracle Autonomous Linux service can take some time to become aware of the changes to the managed instance Oracle Linux version.
Also, before you perform this step, repositories that Leapp used to perform the upgrade remain enabled including Oracle Linux 7 and Oracle Linux 8. After performing this step, only those repositories you configure using Oracle Autonomous Linux are enabled.
-
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
-
On upgraded Oracle Linux 7 instances on Oracle Cloud Infrastructure, update the script to avoid losing SSH connectivity.
-
Use a text editor to open a new
/etc/dhcp/exit-hooks.d/dhclient-exit-hook-set-hostname.sh-ol8
file. -
Add to this script the contents as provided in Updated dhclient Script.
-
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
-
-
Restore network mounted file systems that you unmounted before the upgrade. See File Systems and Storage Issues.
-
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. -
If upgrading KVM hosts, restart the KVM virtual machines.
sudo virsh start vm-name
-
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 toEnforcing
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
-
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.
-
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.
- Edit
/etc/dnf/dnf.conf
by removing or commenting outexclude=
lines that refer toleapp
packages, for example:#exclude=python2-leapp,snactor,leapp-upgrade-el7toel8,leapp
- Use commands such as
rpm -qa
to list packages that can be removed.rpm -qa | grep el7 rpm -qa | grep leapp
- Use the
sudo dnf remove
command to remove the packages listed by the queries.
- Edit
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. -
-
Remove the
/root/tmp_leapp_py3
directory, which is no longer needed. -
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.