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 1734141 - clevis-dracut incorrectly adds network requirement
Summary: clevis-dracut incorrectly adds network requirement
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: clevis
Version: 7.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Sergio Correia
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-29 18:04 UTC by Ian Guy
Modified: 2019-08-20 15:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-20 15:14:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to remove network dependency from clevis-dracut (305 bytes, patch)
2019-07-29 18:04 UTC, Ian Guy
no flags Details | Diff

Description Ian Guy 2019-07-29 18:04:11 UTC
Created attachment 1594384 [details]
Patch to remove network dependency from clevis-dracut

Description of problem:
Cannot use clevis-dracut to automatically decrypt the root volume without enabling network in the initrd generated by dracut/clevis-dracut.

When using the TPM2 encryptor, there is no need for networking features, DHCP or otherwise.
Not a duplicate of 1497566, since that relates to the configuration of early boot networking, while this is related to the removal of networking as a dracut dependency of clevis-dracut.
Although most other usecases of clevis require network, the tpm2 encryptor does not, thus, the early-boot networking dependency should/could/in some fashion be removed from clevis-dracut.


Attempted solutions:
Creating a dracut conf file containing "omit_dracutmodules+="ifcfg network"" disables early boot network by removing it from the initrd.
However, it also prevents the root volume from automatically unlocking.

If /usr/lib/dracut/modules.d/60clevis/module-setup.sh (built from clevis-7-8.el7.src.rpm) is patched as attached and the aforementioned dracut conf file is created, the system works as expected.
That is, the network is not configured during early-boot, and the system automatically unlocks the root volume.
This is not a satisfactory solution, as later updates to clevis-dracut will overwrite this file and hang on start, since the automatic unlocking feature will cease to work.

---
Technical Details
---


Version-Release number of selected component (if applicable):
clevis, clevis-dracut, clevis-luks, clevis-systemd 7-8.el7
tpm2-tools 3.0.4-2.el7
tpm2-tss, tpm2-tss-devel 1.4.0-2.el7
tpm2-abrmd 1.1.0-10.el7
Red Hat 7.7Beta
Red Hat 7.6

How reproducible:
Always

Steps to Reproduce:
1. Encrypt Hard Drive
2. Use clevis-luks-bind with TPM2 chip binding "clevis luks bind -d <device> tpm2"
3. Install clevis-dracut to automatically decrypt hard drive
4. Run "dracut -fv --regenerate-all" to update initrd
5. Reboot and watch the system automatically decrypt/mount the LUKS-encrypted volume using clevis
6. Use "ip addr" to see that system has DHCP-assigned IP addresses 

Actual results:
1 - System boots and decrypts the root volume automatically, successfully during early boot.
2a - System configures networking and receives DHCP lease during early boot.
2b - Alternatively, clevis/dracut/clevis-dracut cannot be configured to not configure kernel networking.

Expected results:
1 - System boots and decrypts the root volume automatically, successfully, during early boot.
2a - System does not configure kernel networking during early boot.
2b - Alternatively, clevis/dracut/clevis-dracut can be configured to not configure kernel networking during early boot.


Additional info:

Comment 5 RHEL Program Management 2019-08-20 15:14:36 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


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