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 1761429

Summary: systemd-cryptsetup-generator ignores LUKS devices, preventing the system to boot
Product: Red Hat Enterprise Linux 7 Reporter: Renaud Métrich <rmetrich>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7CC: alwyn, jcall, scorreia, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-11 21:47:36 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:
Bug Depends On:    
Bug Blocks: 1801675    

Description Renaud Métrich 2019-10-14 11:42:29 UTC
Description of problem:

When using Clevis, it is convenient to tell dracut to add the rd.luks.uuid and rd.lvm.lv entries in a /etc/cmdline.d file packed into the initramfs. This can be done by setting "hostonly_cmdline='yes'" in a file in /etc/dracut.conf.d, e.g. /etc/dracut.conf.d/99-clevis-luks.conf

Unfortunately, when doing so, the admin must make sure *no* rd.luks.uuid parameter is passed to the kernel command line, or else systemd-cryptsetup-generator will *ignore* all the rd.luks.uuid entries in /etc/cmdline.d/90crypt.conf, e.g.:

systemd-cryptsetup-generator[160]: Not creating device 'luks-fc691f4a-285d-406f-ad0d-c1ea19c4b9b9' because it was not specified on the kernel command line.
(seen on RHEL8, silent on RHEL7...)

This is due to systemd-cryptsetup-generator running too early during boot and relying on /proc/cmdline only, instead of relying on /proc/cmdline + /etc/cmdline.d content.


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

systemd-219 and later


How reproducible:

Always


Steps to Reproduce:
1. Configure a "LUKS1 on LVM" system with dedicated /usr file system

  To do so, don't click on "Click here to create them automatically" in storage panel but directly on "+" button.
  This will create 1 LVM VG on /dev/vda2 + as many Luks devices as there are logical volumes.
  Split the system in many parts e.g. / /usr swap
  Use "redhat" password for encryption.

2. Configure Clevis+Tang

  # yum -y install clevis-dracut
  # for i in $(seq 0 7); do clevis luks bind -f -k- -d /dev/rhel/0$i tang '{"url":"http://vm-tang7","thp":"txJOw9zhjTgEwcNnlRN-NGsv3hU"}' <<< "redhat"; done

3. Produce a "hostonly_cmdline" initramfs

  # dracut --hostonly-cmdline -f /boot/initramfs-$(uname -r).img $(uname -r)

4. Remove all rd.luks.uuid from kernel command line except one

  # vi /etc/default/grub
  GRUB_CMDLINE_LINUX="crashkernel=auto ... rd.luks.uuid=luks-50e5d2d4-a66d-49d8-a082-cfbfc64de1f3"
  # grub2-mkconfig -o /etc/grub2.cfg

5. Reboot

Actual results:

  System enters dracut emergency mode

Comment 2 Renaud Métrich 2019-10-14 11:43:54 UTC
Actually, you don't need to setup Clevis to reproduce at all, but it's the usual use case.

Comment 4 Chris Williams 2020-11-11 21:47:36 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7