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 1783263 - [spec] remote-cryptsetup.target is not enabled by default
Summary: [spec] remote-cryptsetup.target is not enabled by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Jan Macku
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-13 13:24 UTC by Renaud Métrich
Modified: 2023-03-24 16:26 UTC (History)
7 users (show)

Fixed In Version: systemd-239-48.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:54:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4469 0 None None None 2021-11-09 19:55:24 UTC

Description Renaud Métrich 2019-12-13 13:24:56 UTC
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

Comment 1 David Tardon 2020-07-20 10:36:46 UTC
We should use "systemctl preset-all" like Fedora does. Relevant change to systemd.spec: https://src.fedoraproject.org/rpms/systemd/c/8510cadb34504578fbefad8d57df3e256d9ca394

Comment 3 George C. Wilson 2021-05-25 22:31:59 UTC
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.

Comment 8 errata-xmlrpc 2021-11-09 19:54:49 UTC
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


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