DEV Community

Abhilash Kumar | Oracle ACE ♠ for Nabhaas Cloud Consulting

Posted on • Edited on

OCI "leapp upgrade" for OCI compute instances

{ Abhilash Kumar Bhattaram : Follow on LinkedIn }

About leapp upgrade

Leapp upgrade is a utility provided in Oracle Linux and Red Hat Enterprise Linux that helps administrators move from one major version of the operating system to another (for example, from OL7 to OL8 or OL8 to OL9) in a controlled and automated way. Instead of performing a fresh installation and manually migrating applications, Leapp analyzes the system, checks for compatibility issues, and generates reports about potential risks or required changes before the upgrade is executed. This makes it especially useful for beginners, as it reduces the chances of errors, highlights unsupported packages, and guides you with recommended fixes. By simplifying the upgrade process, Leapp ensures that mission-critical workloads, databases, and applications can transition smoothly to newer, more secure, and better-performing Linux versions.

Refere this Document for Linux Support timelines
https://www.oracle.com/a/ocom/docs/elsp-lifetime-069338.pdf

Oracle Documentation

It is important to thoroughly understand the leapp upgrade Oracle documentation , the official link is here

https://docs.oracle.com/en/learn/ol-linux-leapp/index.html#preparing-for-the-upgrade-from-oracle-linux-7-to-oracle-linux-8

Before you attempt to do any activity this needs to be tested in Non Prods with sufficient boot volume backups.

Deciphering the upgrade steps

Typical leapp upgrade steps are as below

To Clear inhibitors

#1) sudo leapp preupgrade --oci
---> Ensure there are no inhibitors in /var/log/leapp/leapp-report.txt

#2) To clear typical inhibitors 

# leapp answer --section os_management_hub_agent_check.confirm=True
# leapp answer --section osmh_post_check.confirm=True
# leapp answer --section instant_client_install.confirm=True
# leapp answer --section remove_pam_pkcs11_module_check.confirm=True

#3) sudo leapp upgrade --oci

NOTE : The --oci is mandatory for Compute intances on Orace Linux , for on premise system it would be --oraclelinux 

    • Use --oci if the server is running in Oracle Cloud Infrastructure.
    • Use --oraclelinux if the server is on-prem 

Enter fullscreen mode Exit fullscreen mode

Understanding inhibitors

A Typical preupgrade inhibitor would be as shown in "preupgrade --oci"

A Typical upgrade inhibitor would be as shown in "upgrade --oci"
where it would be 0

## Understanding Logfiles used in leapp upgrades

/var/log/leapp/answerfile

In a Leapp upgrade, an answer file is a configuration file that stores your responses to interactive questions raised during the pre-upgrade check or the upgrade process.
When you run leapp preupgrade, Leapp analyzes your system and sometimes identifies situations where it cannot decide automatically (for example, whether to enable or disable certain modules, replace deprecated packages, or handle custom configurations). In such cases, it generates an answer file inside:

/var/log/leapp/leapp-report.txt
Text report about about inhibitors , risks of various categories ( HIGH / MEDIUM / LOW )

/var/log/leapp/leapp-report.json
JSON report about about inhibitors , risks of various categories ( HIGH / MEDIUM / LOW )

/var/log/leapp/leapp-preupgrade.log
Detailed log file about the last run leapp upgrade
leapp will not maintain older log file contents , if you are planning to run multiple leapp operations its recommended you take a manual backup of log files.

Top comments (0)