Bug 1312149 - Booting from iSCSI LUKS partition hangs for 90 seconds [NEEDINFO]
Booting from iSCSI LUKS partition hangs for 90 seconds
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut (Show other bugs)
7.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Lukáš Nykrýn
Release Test Team
:
Depends On:
Blocks: 1289485 1313485
  Show dependency treegraph
 
Reported: 2016-02-25 16:22 EST by William Skupa
Modified: 2017-04-06 08:45 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-06 08:45:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
harald: needinfo? (skupawa)


Attachments (Terms of Use)

  None (edit)
Description William Skupa 2016-02-25 16:22:05 EST
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 07:26:54 EST
Does it help to add:

                           -p 'DefaultDependencies=no' \

to the systemd-run call?

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