RHEL7/8/9 Leapp upgrade utility
Here we are going to see how to use leapp upgrade utility to perform an upgrade of RHEL7.9 to RHEL8 or RHEL version 8.6 to version 9. This note is specific to RHEL7.9 to 8 upgrade.
Update RHEL version 7.x to 7.9 and 8.x to 8.6 prior to planning upgrade to major versions.
Few riders are,
- NFS and network storage protocols like iscsi are not supported.
- Only upgrade to following major version is supported, ex RHEL7 to RHEL8 & RHEL8 to RHEL9.
- Wont work on your encrypted root device.
- Public cloud instance using RedHat Update Infrastructure are not eligible for Leapp upgrade.
- VDO devices must be converted to LVM managed devs.
- For RHEL7, the minor version should at least be, 7.9. So update your OS to version 7.9 .
- Take backup and snapshots to restore back to previous version and avoid complete loss of servers.
- Generate Sosreports.
- rhel-7-server-extras-rpms should be added to repolist and enabled.
- Clear any yum version locks.
# yum versionlock clear
# subscription-manager repos --enable rhel-7-server-extras-rpms
Leapp can now be installed on rhel7.
# yum install leapp -y
Few quick mental map on leapp:
Leapp Upgrade = Pre-Upgrade Analysis phase + Upgrade Phase.
You get 2 commands, leapp & leapp-upgrade-el8toel9 available from rhel-8-for-x86_64-appstream-rpms repo.
Remove left over file from any previous leapp upgrade , /root/tmp_leapp_py3 .
Now perform, pre-upgrade analysis:
# leapp preupgradeundefined
Generates, reports on ability to upgrade node with pointers to remediations, stores responses to queries in answer file, logs in preupgrade.log file. Also keeps the report in json format file. All these files are in /var/log/leapp.
In the report, risk factors are denoted High, Medium, Low, Info . It has title that identifies the element in question, summary to provide description, remediation recommends certain actionables.
Leapp utility makes use of Actors, that can change your system configs. These are written in Python and one can create their own custom Actors.
Keep re-running the preupgrade phase untill output is clean with no inhibitors (blockers to upgrade). Then move to upgrade part.
Once system is ready to be upgraded, run one of below commands,
# leapp upgrade
# leapp upgrade –reboot
1st Reboot, bootloader automatically creates another boot env with RHEL-Upgrade-Initramfs, where the upgrade will happen.
2nd Reboot, SELinux labels wll be restored and go for this reboot.
3rd Reboot, final one post which RHEL upgraded environment can be verfied and then used.
Comments
Post a Comment