8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
Home » Articles » Linux » Here
Leapp : Upgrade Oracle Linux 7 (OL7) to Oracle Linux 8 (OL8)
This article demonstrates how to upgrade an Oracle Linux 7 (OL7) installation to Oracle Linux 8 (ol8) using Leapp.
Assumptions
Here are a few assumptions you should consider before launching into this.
- You must check out the official documentation for this functionality (here). This article includes the minimum steps to complete the process, but it doesn't include all the pre-checks and investigation you may need to do before considering using this for something real.
- You have an existing Oracle Linux 7 (OL7) installation. In this case I used an OL7 virtual machine.
- It's always better to do a clean installation, rather than an upgrade, but depending on the level of automation of your build processes, clean installations on new kit could be a much bigger job than upgrading.
- You have sufficient backups to restore the server to it's previous state, should something go wrong during the upgrade.
- All commands are run as the root user. If you are using
sudo
, simply prefix them with "sudo
".
Basic Prerequisites
Check out the Leapp documentation for a comprehensive list of prerequisites.
Check the locale is set to "en_US.UTF-8".
cat /etc/locale.conf LANG="en_US.UTF-8" #
For KVM hosts, we need to shutdown all running virtual machines.
# List all VMs. virsh list --all # Turn off each VM. virsh shutdown {vm-name}
For systems registered with ULN, we need to unregister the system. This is explained at point 12 here. Our system is using yum.oracle.com, not ULN, so this step is unnecessary.
Make sure the root SSH logins are possible by adding the following entry to the "/etc/ssh/sshd_config" file.
PermitRootLogin yes
Install Leapp
We use the following command to enable required repositories for Leapp, and install the Leapp software.
yum install -y leapp-upgrade --enablerepo=ol7_leapp,ol7_latest
We make sure our installation is totally up to date, and reboot before continuing.
yum update -y reboot
Preupgrade
We run the preupgrade using the following command.
# On-Prem or other cloud providers leapp preupgrade --oraclelinux # OCI leapp preupgrade --oci
This produces a number of files in the "/var/log/leapp" directory.
cd /var/log/leapp ls answerfile answerfile.userchoices archive leapp-preupgrade.log leapp-report.json leapp-report.txt #
The "leapp-report.txt" file contains a list of risk factors that could cause problems during the upgrade. In some cases these may be resolved by a configuration change, or package installations or removals. Make sure all issues are resolved, or you accept the risks associated with them.
In my case I had to perform a single action before I could proceed, and was advised of a step to take after the upgrade completes.
# Before upgrade # Answer an additional question. leapp answer --section remove_pam_pkcs11_module_check.confirm=True # After upgrade alternatives --set python /usr/bin/python3
Notice we used the Leapp CLI to answer the remaining question. We could have manually edited the "answerfile" to achieve the same result.
Once all inhibitors have been fixed, run the preupgrade again to make sure it completes as expected.
# On-Prem or other cloud providers leapp preupgrade --oraclelinux # OCI leapp preupgrade --oci
Upgrade
Check the current release.
cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.9 (Maipo) # cat /etc/oracle-release Oracle Linux Server release 7.9 #
We are now in a position to run the upgrade, using the following command.
# On-Prem or other cloud providers leapp upgrade --oraclelinux # OCI leapp upgrade --oci
Once the upgrade has completed, reboot the server.
reboot
It's worth watching the console, as some upgrades result in failures that are only visible at the console as the server boots.
Post-Upgrade
Check the current release.
cat /etc/redhat-release Red Hat Enterprise Linux release 8.6 (Ootpa) # cat /etc/oracle-release Oracle Linux Server release 8.6 #
We can also check the kernel and and default kernel.
uname -r 5.4.17-2136.311.6.el8uek.x86_64 # sudo grubby --default-kernel /boot/vmlinuz-5.4.17-2136.311.6.el8uek.x86_64 #
Configure your local firewall using firewalld. Firewalld is described here.
If you are using SELinux, configure it, as described here.
For KVM hosts, we start all virtual machines.
# List all VMs. virsh list --all # Turn off each VM. virsh start {vm-name}
Review the available repositories in the "/etc/yum.repos.d" directory, and remove any OL7 repositories.
Run any post-upgrade commands suggested by the pre-upgrade.
Restore any configuration changes that were necessary to remove inhibitors, for example mount NFS/CIFS shares.
Thoughts
Here are some thoughts about the Leapp upgrades.
- As mentioned previously, a clean install is always a better option if it is possible.
- Every server could have a different set of issues/inhibitors reported, so upgrades will always need to be done on a case-by-case basis.
- I attempted a number of upgrades on VMs and physical machines and the results were very mixed. Some outright failed. Some appeared to work, but left the system in an "interesting" state. I didn't feel very confident about the results, except on really "clean" OL7 installations.
- You must have access to the console to perform the upgrade. Most of the actual upgrade steps are shown on the console after the reboot, so any problems/errors will only be seen there, and you may need to intervene.
For more information see:
Hope this helps. Regards Tim...