Bug 1513397

Summary: dracut timeout if iscsi boot attempted but not present
Product: Red Hat Enterprise Linux 7 Reporter: Derek Higgins <derekh>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: derekh, dracut-maint-list, jikortus, jstodola, lnykryn, mbanas
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-033-546.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:26:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1562164    

Description Derek Higgins 2017-11-15 10:37:19 UTC
Description of problem:
On a RHEL 7.4 qcow2 cloud image, in order to boot using a iscsi root disk I've enabled the "iscsi" module in a dracut ramdisk and passed in rd.iscsi.firmware=1.
This works as expected and the image can now be booted over iscsi but the image can no longer be used to boot using a local disk. dracut times out waiting for a iscsi disk to be attached (see below).

In order to remove the need to have 2 slightly different images, the image should be capable to booting in both scenarios

This is now fixed in upstream dracut
https://github.com/dracutdevs/dracut/pull/298

Version-Release number of selected component (if applicable):
dracut-033-502.el7.x86_64
dracut-network-033-502.el7.x86_64
iscsi-initiator-utils-6.2.0.874-4.el7.x86_64
iscsi-initiator-utils-iscsiuio-6.2.0.874-4.el7.x86_64
redhat-release-server-7.4-18.el7.x86_64

How reproducible:
every time

Steps to Reproduce:
Prepare a rhel qcow image to boot over iscsi by
1. adding the iscsi module to the ramdisk (in chroot)
yum install -y iscsi-initiator-utils-6.2.0.874-4.el7.x86_64 iscsi-initiator-utils-iscsiuio-6.2.0.874-4.el7.x86_64
dracut --force --add "network iscsi" /boot/initramfs-3.10.0-693.el7.x86_64.img 3.10.0-693.el7.x86_64
2. Edit the file /etc/default/grub and add rd.iscsi.firmware=1 to GRUB_CMDLINE_LINUX=…
3. reconfigure grub
guestfish -a /tmp/rhel-server-7.4-x86_64-kvm.qcow2 -m /dev/sda1 sh "/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg"
4. Use this image to boot from local disk as would be the usual (e.g. on a openstack cloud)

Actual results:
[    1.848791] Chelsio T4-T6 iSCSI Driver cxgb4i v0.9.5-ko (Apr. 2015)
[    1.851794] iscsi: registered transport (cxgb4i)
[    1.860190] cnic: QLogic cnicDriver v2.5.22 (July 20, 2015)
[    1.865502] QLogic NetXtreme II iSCSI Driver bnx2i v2.7.10.1 (Jul 16, 2014)
[    1.866914] iscsi: registered transport (bnx2i)
[    1.875070] iscsi: registered transport (be2iscsi)
[    1.876227] In beiscsi_module_init, tt=ffffffffc027a120
[    1.445433] dracut-initqueue[303]: RTNETLINK answers: File exists
[[32m  OK  [0m] Found device /dev/disk/by-uuid/716e713d-4e91-4186-81fd-c6cfa1b0974d.
         Starting File System Check on /dev/...d-4e91-4186-81fd-c6cfa1b0974d...
[[32m  OK  [0m] Started File System Check on /dev/d...13d-4e91-4186-81fd-c6cfa1b0974d.
[    2.124061] tsc: Refined TSC clocksource calibration: 2299.996 MHz
[    4.184362] dracut-initqueue[303]: Warning: iscistart: Could not get list of targets from firmware.
[  127.380403] dracut-initqueue[303]: Warning: dracut-initqueue timeout - starting timeout scripts
         Stopping Open-iSCSI...
[[32m  OK  [0m] Stopped Open-iSCSI.
         Starting Open-iSCSI...
[[32m  OK  [0m] Started Open-iSCSI.
[  129.415241] dracut-initqueue[303]: Warning: iscistart: Could not get list of targets from firmware.
[  129.931535] dracut-initqueue[303]: Warning: dracut-initqueue timeout - starting timeout scripts
...
[  190.293275] dracut-initqueue[303]: Warning: dracut-initqueue timeout - starting timeout scripts
[  190.295153] dracut-initqueue[303]: Warning: Could not boot.
         Starting Setup Virtual Console...
[[32m  OK  [0m] Started Setup Virtual Console.
Starting Dracut Emergency Shell...

Generating "/run/initramfs/rdsosreport.txt"

Expected results:
the image should boot

Comment 2 Lukáš Nykrýn 2017-11-15 16:08:37 UTC
Looks backportable -> devel_ack

Comment 6 Martin Banas 2018-08-08 12:26:12 UTC
Hi Derek,
Could you please check if the solution in new dracut package works for you? Preferably on RHEL-7.6 Beta candidate compose.

Thanks a lot
Martin

Comment 10 errata-xmlrpc 2018-10-30 11:26:36 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, 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-2018:3232