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.
Description of problem:
remote-cryptsetup.target is not enabled by default even though it should be.
/usr/lib/systemd/system-preset/90-systemd.preset lists this unit:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
enable remote-cryptsetup.target
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# systemctl status remote-cryptsetup.target
● remote-cryptsetup.target - Remote Encrypted Volumes
Loaded: loaded (/usr/lib/systemd/system/remote-cryptsetup.target; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
But our RPM doesn't enable it:
systemd.spec:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
721 systemctl preset --quiet \
722 remote-fs.target \
723 getty@.service \
724 serial-getty@.service \
725 console-getty.service \
726 debug-shell.service \
727 systemd-resolved.service \
728 >/dev/null || :
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
This makes decryption of remote volumes not automatic (the user must unlock the volume manually by executing the corresponding systemd-cryptsetup@luks... service).
Version-Release number of selected component (if applicable):
systemd-239-18.el8.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Install a system with 1 luks device for some non-root volume, e.g. "/data" mount point backed on encrypted /dev/vda3
2. Boot regularly, passphrase is requested (OK)
3. Add _netdev to /etc/crypttab and /etc/fstab to simulate a remote volume and reboot
Actual results:
Passphrase is not asked for, systemd-cryptsetup@luks... is not executed.
Additionally:
- Boot hangs forever waiting for device to come up because x-systemd.device-timeout=0 in /etc/fstab
I also ran into this issue while trying to integrate a network-based key management service with cryptsetup, passed the _netdev option in the /etc/crypttab line for the device, and didn't get the expected result. remote-cryptsetup.target should be enabled by default IMO.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:4469
Description of problem: remote-cryptsetup.target is not enabled by default even though it should be. /usr/lib/systemd/system-preset/90-systemd.preset lists this unit: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- enable remote-cryptsetup.target -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # systemctl status remote-cryptsetup.target ● remote-cryptsetup.target - Remote Encrypted Volumes Loaded: loaded (/usr/lib/systemd/system/remote-cryptsetup.target; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:systemd.special(7) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- But our RPM doesn't enable it: systemd.spec: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 721 systemctl preset --quiet \ 722 remote-fs.target \ 723 getty@.service \ 724 serial-getty@.service \ 725 console-getty.service \ 726 debug-shell.service \ 727 systemd-resolved.service \ 728 >/dev/null || : -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- This makes decryption of remote volumes not automatic (the user must unlock the volume manually by executing the corresponding systemd-cryptsetup@luks... service). Version-Release number of selected component (if applicable): systemd-239-18.el8.x86_64 How reproducible: Always Steps to Reproduce: 1. Install a system with 1 luks device for some non-root volume, e.g. "/data" mount point backed on encrypted /dev/vda3 2. Boot regularly, passphrase is requested (OK) 3. Add _netdev to /etc/crypttab and /etc/fstab to simulate a remote volume and reboot Actual results: Passphrase is not asked for, systemd-cryptsetup@luks... is not executed. Additionally: - Boot hangs forever waiting for device to come up because x-systemd.device-timeout=0 in /etc/fstab