Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2225477

Summary: Leapp upgrade in systems where the LVM2 package has been removed ends in emergency mode
Product: Red Hat Enterprise Linux 7 Reporter: Jesús Pérez Martínez <jeperez>
Component: leapp-repositoryAssignee: Leapp team <leapp-notifications>
Status: CLOSED NOTABUG QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.9CC: pstodulk
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-25 12:55:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.