Bug 2225477 - Leapp upgrade in systems where the LVM2 package has been removed ends in emergency mode
Summary: Leapp upgrade in systems where the LVM2 package has been removed ends in emer...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Leapp team
QA Contact: Upgrades and Supportability
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-25 12:16 UTC by Jesús Pérez Martínez
Modified: 2023-07-25 12:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-25 12:55:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OAMG-9462 0 None None None 2023-07-25 12:17:51 UTC
Red Hat Issue Tracker RHELPLAN-163308 0 None None None 2023-07-25 12:17:46 UTC

Description Jesús Pérez Martínez 2023-07-25 12:16:58 UTC
Description of problem:
When a system uses LVM and the package LVM2 is removed (either completely or only from the RPM database), the preupgrade will return a greencheck and the upgrade initramfs will be generated including the LVM module:
~~~
[root@localhost boot]# rpm -qa | grep lvm2
[root@localhost boot]# lsinitrd /boot/initramfs-upgrade.x86_64.img | grep lvm | wc -l
22
~~~

However, during the actual upgrade the RHEL 8.8 initramfs will be created without the LVM module:
~~~
bash-4.4# lsinitrd /boot/initramfs-4.18.0-477.15.1.el8_8.x86_64.img | grep lvm | wc -l
0
~~~

The system ends up in emergency mode after the automatic reboot, because the LVs cannot be initialized.

Version-Release number of selected component (if applicable):
Latest

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL with an LVM layout (the default automatic partition works fine).
2. Remove the LVM2 package from the system.
3. Run leapp upgrade.
4. Reboot to the upgrade initramfs, wait for the upgrade process to finish and boot with the RHEL 8 grub entry.

Actual results:
System ends up in emergency mode.

Expected results:
Leapp is able to catch this as an inhibitor.

Comment 3 Petr Stodulka 2023-07-25 12:55:10 UTC
Hi Jesus, thank you for the report. From our perspective, this is not a bug - this is actually broken system already. In case someone has LVM layout on the system, it is hard requirement to have installed LVM packages. Without lvm packages we are not even able to detect LVM configuration/layout (e.g. lvdisplay is not present...). It is analogical to the situation, when you use EFI boot but remove efibootmgr. From this point, closing as not a bug. User in this case mast have installed LVM related packages and it must be tracked by RPMDB.


Note You need to log in before you can comment on or make changes to this bug.