Bug 1312149 - Booting from iSCSI LUKS partition hangs for 90 seconds [NEEDINFO]
Summary: Booting from iSCSI LUKS partition hangs for 90 seconds
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1289485 1313485
TreeView+ depends on / blocked
 
Reported: 2016-02-25 21:22 UTC by William Skupa
Modified: 2020-02-13 22:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-06 12:45:11 UTC
Target Upstream Version:
harald: needinfo?


Attachments (Terms of Use)

Description William Skupa 2016-02-25 21:22:05 UTC
Description of problem:
Booting from a LUKS partition mounted over iSCSI takes 90 seconds.  This is because LUKS systemd service blocks the iSCSI systemd service.  Once the LUKS service times out after 90 seconds, the iSCSI drive is mounted and decrypted and the boot continues.

If you switch 95iscsi/iscsiroot.sh to use iscsistart instead of systemd-run, the problem goes away

Version-Release number of selected component (if applicable):
dracut 033-360.el7_2
dracut-network 033-360.el7_2

How reproducible:
100%

Steps to Reproduce:
1.  Create a system with an iSCSI root LUKS partition.  crypttab and key are both stored in dracut image.  Kernel params are used to specify iSCSI info
    crypttab device /dev/sda1
    root=/dev/dm-0
    netroot=<iscsi.target>
2. Boot system

Actual results:
[  OK  ] Reached target Paths.
<System hangs for 90 seconds>
[ TIME ] Timed out waiting for device dev-sda1.device
[DEPEND] Dependency failed for Cryptography Setup for luks-<UUID>
[DEPEND] Dependency failed for Encrypted Volumes
[  OK  ] Reached target System Initialization
[  OK  ] Listening on Open-iSCSI iscsiuio Socket
[  OK  ] Reached target Sockets
[  OK  ] Reached target Basic System
         Starting Login iSCSI Target <iscsi.target>
[  OK  ] Started Login iSCSI Target <iscsi.target>
         Starting Cryptography Setup for luks-<UUID>
[  OK  ] Found device /dev/mapper/luks-<UUID>
[  OK  ] Found device /dev/dm-0
[  OK  ] Started Cryptography Setup for luks-<UUID>

Expected results:
System shouldn't hang for 90 seconds

Additional info:
After forcing the code to use iscsistart instead of systemd-run:

[  OK  ] Reached target Paths.
[   11.188915] dracut-initque[309]: iscsistart: Can not bind IPC socket
[   11.189141] dracut-initque[309]: iscsistart: Could not setup mgmt ipc
[  OK  ] Found device <iscsi.target> 1.
         Starting Cryptography Setup for luks-<UUID>
[  OK  ] Found device /dev/mapper/luks-<UUID>
[  OK  ] Found device /dev/dm-0
[  OK  ] Started Cryptography Setup for luks-<UUID>
[  OK  ] Reached target Encrypted Volumes
[  OK  ] Reached target System Initialization
[  OK  ] Listening on Open-iSCSI iscsiuio Socket
[  OK  ] Reached target Sockets
[  OK  ] Reached target Basic System

Comment 3 Harald Hoyer 2017-01-11 12:26:54 UTC
Does it help to add:

                           -p 'DefaultDependencies=no' \

to the systemd-run call?

Comment 4 William Skupa 2018-09-18 20:45:25 UTC
Project was terminated. Recommend closing for lack of data


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