This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2131963 - [spec] remote-cryptsetup.target is disabled in "guest" image
Summary: [spec] remote-cryptsetup.target is disabled in "guest" image
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Macku
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-04 09:59 UTC by Marius Vollmer
Modified: 2023-09-21 12:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-21 12:19:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-5954 0 None Migrated None 2023-09-21 12:19:33 UTC
Red Hat Issue Tracker RHELPLAN-135798 0 None None None 2022-10-06 08:10:49 UTC

Description Marius Vollmer 2022-10-04 09:59:07 UTC
Description of problem:

The remote-cryptsetup.target systemd unit is disabled in a new installation that uses the "guest" image here:

http://download.devel.redhat.com/rhel-8/rel-eng/RHEL-8/latest-RHEL-8.4/compose/BaseOS/x86_64/images//rhel-guest-image-8.4-992.x86_64.qcow2

The unit is "preset: enabled", but its actual state is "disabled" when the image above is booted.

The same is true for all RHEL 8, RHEL 9, and Fedora images I have tried.  I think this was supposed to with in bug 1783263, but it is still broken for me.

The remote-cryptsetup.target unit is important for NBDE. When it is disabled, encrypted block devices with "_netdev" will not be processed at all during boot.

Version-Release number of selected component (if applicable):
systemd-udev-239-45.el8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. curl -L -o image.qcow2 http://download.devel.redhat.com/rhel-8/rel-eng/RHEL-8/latest-RHEL-8.4/compose/BaseOS/x86_64/images//rhel-guest-image-8.4-992.x86_64.qcow2
2. curl -L -O https://github.com/cockpit-project/bots/raw/main/machine/cloud-init.iso
3. qemu-system-x86_64 -cpu host -enable-kvm -nographic -m 2048 -drive file=image.qcow2,if=virtio -snapshot -cdrom cloud-init.iso -net nic,model=virtio -net user,hostfwd=tcp::22001-:22
4. login as root, password "foobar"
5. systemctl status remote-cryptsetup.target

Actual results:
● 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)


Expected results:
● remote-cryptsetup.target - Remote Encrypted Volumes
   Loaded: loaded (/usr/lib/systemd/system/remote-cryptsetup.target; enabled; vendor preset: enabled)
   Active: active since Tue 2022-10-04 05:57:18 EDT; 1s ago
     Docs: man:systemd.special(7)

Oct 04 05:57:18 localhost systemd[1]: Reached target Remote Encrypted Volumes.


Additional info:

I think there is no reason why remote-cryptsetup.target should ever not be part of the boot.

Comment 1 Marius Vollmer 2022-10-04 10:01:10 UTC
This bugs exists in all versions of RHEL that I have tested.  Do I need to clone it explicitly?

Comment 2 David Tardon 2022-10-06 08:08:14 UTC
(In reply to Marius Vollmer from comment #0)
> Description of problem:
> 
> The remote-cryptsetup.target systemd unit is disabled in a new installation
> that uses the "guest" image here:
> 
> http://download.devel.redhat.com/rhel-8/rel-eng/RHEL-8/latest-RHEL-8.4/
> compose/BaseOS/x86_64/images//rhel-guest-image-8.4-992.x86_64.qcow2
> 
> The unit is "preset: enabled", but its actual state is "disabled" when the
> image above is booted.
> 
> The same is true for all RHEL 8, RHEL 9, and Fedora images I have tried.  I
> think this was supposed to with in bug 1783263, but it is still broken for
> me.

Well, apparently that bug hasn't really been fixed. And I see why. We run the preset-all on installation in %post of systemd package, which is too early (remote-cryptsetup.target is in systemd-udev, which itself depends on systemd, hence it will normally be installed after it). Either there's something else (anaconda?) that's supposed to run preset-all after installation (in which case it's pointless doing it in systemd's %post); or systemd should run it in %posttrans; or packages are supposed to run preset for every presettable unit they ship (in which case it's a bug that systemd-udev doesn't do it for remote-cryptsetup.target. And the preset-all in systemd's %post exists to fix presets for packages that've been installed _before_ systemd). We have to check what's the intent here to understand where this should be fixed.

> > I think there is no reason why remote-cryptsetup.target should ever not be
> part of the boot.

Apparently that's done for consistency with remote-fs.target.

Comment 3 Marius Vollmer 2022-10-07 07:44:04 UTC
(In reply to David Tardon from comment #2)

> Well, apparently that bug hasn't really been fixed.

Is there any test that would catch this?  This bug breaks our whole NBDE story, no?  Our documentation doesn't mention this either.  (It only talks about enabling clevis-luks-asspass.path, AFAICS, but not "_netdev" and remote-cryptsetup.target)  So how do people do NBDE?

Will fixing this in our packages fix systems that are upgraded from a buggy version to a fixed version?  Or will upgrading leave remote-cryptsetup.target disabled because presets are only applied during a fresh installation?

Comment 4 David Tardon 2022-10-10 12:46:13 UTC
(In reply to Marius Vollmer from comment #3)
> (In reply to David Tardon from comment #2)
> 
> > Well, apparently that bug hasn't really been fixed.
> 
> Is there any test that would catch this? 

If there were one, the issue would have been caught...

> This bug breaks our whole NBDE
> story, no?  Our documentation doesn't mention this either.  (It only talks
> about enabling clevis-luks-asspass.path, AFAICS, but not "_netdev" and
> remote-cryptsetup.target)  So how do people do NBDE?

I've no idea about NBDE, sorry.

> Will fixing this in our packages fix systems that are upgraded from a buggy
> version to a fixed version?  Or will upgrading leave
> remote-cryptsetup.target disabled because presets are only applied during a
> fresh installation?

I think enabling on upgrade from broken to fixed version could be handled by %trigger(post)un for the broken version. We already do this for a couple of systemd services in Fedora. (Provided triggers are available in RHEL-8's rpm. I don't remember when they were introduced.)

Comment 8 RHEL Program Management 2023-09-21 12:15:56 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 9 RHEL Program Management 2023-09-21 12:19:35 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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