Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1201035

Summary: Cannot create a suitable iSCSI boot initramfs after migration from disk boot
Product: Red Hat Enterprise Linux 7 Reporter: Darryl Bond <darryl.bond>
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.3CC: dracut-maint-list, harald, jstodola, mhruscak, tim.darnell
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 07:57:37 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: 1289485, 1313485    
Attachments:
Description Flags
Compressed Log of dracut debug output none

Description Darryl Bond 2015-03-11 22:04:17 UTC
Description of problem: Attempting to convert a VMWare NFS hosted Centos 7 to iSCSI boot via iPXE.

testing with Centos 7
1. Converted the disk image from vmdk to raw image via qemu-img convert.
2. Used dd to copy the raw image over the iSCSI LUN
3. Successfully mounted the lun
4. Copied an identical kernel/initrd from a previously freshly anaconda installed iSCSI boot VM of the same version to the converted (migrated) machine.
5 Modified the grub configuration to tell the kernel to iSCSI boot.
6. Successfully boot the migrated VM via iSCSI root with the copied disk.

I cannot find the incantation with dracut that can create an iSCSI bootable initramfs on the migrated machine. I cannot find any configuration on the machine that was installed iSCSI boot via anaconda that would cause it to generate the valid initramfs that I copied to the migrated machine.

Version-Release number of selected component (if applicable):
dracut-033-161.el7_0.173.x86_64
kernel-3.10.0-123.20.1.el7.x86_64

How reproducible:


Steps to Reproduce:
1. /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="vconsole.keymap=us iscsi_firmware ip=ibft crashkernel=auto  vconsole.font=latarcyrheb-sun16"
GRUB_DISABLE_RECOVERY="true"
2. # dracut /tmp/initramfs.img
3. # lsinitrd /tmp/initramfs.img | grep iscsi

Actual results:
No iscsi boot dracut or kernel modules or software in the initrd


Expected results:
A suitable iscsi bootable initrd


Additional info:
/etc/dracut.conf is empty (as is the installed iSCSI boot VM)
/etc/dracut.conf.d/ is empty on both.

Comment 2 Harald Hoyer 2015-03-13 09:12:45 UTC
Is dracut-network installed?

You also might want to use the non-hostonly option for initramfs generation:

# dracut -N /tmp/initramfs.img

Comment 3 Darryl Bond 2015-03-15 22:58:52 UTC
dracut-network is installed.

dracut -N /tmp/initramfs.img certainly ends up with everything but the kitchen sink, but no dracut iscsi
dracut-033-161.el7_0.173 with dracut modules:
bash
i18n
network
ifcfg
drm
plymouth
btrfs
crypt
dm
dmraid
kernel-modules
lvm
mdraid
resume
rootfs-block
terminfo
udev-rules
biosdevname
systemd
usrmount
base
fs-lib
shutdown

This is the header of the one built by anaconda iSCSI root, note the iscsi module.
dracut-033-161.el7_0.173 with dracut modules:
bash
i18n
network
ifcfg
drm
plymouth
kernel-modules
iscsi
resume
rootfs-block
terminfo
udev-rules
biosdevname
systemd
usrmount
base
fs-lib
shutdown

Comment 4 Harald Hoyer 2015-03-16 10:53:28 UTC
What is the output of dracut, if you add the "--debug" option?

Comment 5 Darryl Bond 2015-03-16 21:26:50 UTC
Created attachment 1002506 [details]
Compressed Log of dracut debug output

dracut -N --debug initrd.img

Comment 6 Darryl Bond 2015-03-16 21:47:15 UTC
There is more wrong with the migration that meets the eye. The VM loses it's iSCSI root disk overnight as well. Still responds to pings though.
Has done it each night so far :(

I enabled journald permanent logging but, of course, nothing was logged. No disk.

Comment 7 Harald Hoyer 2015-04-14 13:28:00 UTC
Are these rpms installed?
iscsi-initiator-utils
hostname

Comment 8 Harald Hoyer 2015-04-14 13:30:18 UTC
Sorry, that dracut did not tell you, that is was expecting to find:
- iscsistart
- iscsi-iname
- hostname

If one of these is missing, then it can't support iSCSI in the initramfs.

Current rawhide versions of dracut tell you what is missing.

Comment 9 Harald Hoyer 2015-04-14 13:59:28 UTC
(In reply to Darryl Bond from comment #6)
> There is more wrong with the migration that meets the eye. The VM loses it's
> iSCSI root disk overnight as well. Still responds to pings though.
> Has done it each night so far :(
> 
> I enabled journald permanent logging but, of course, nothing was logged. No
> disk.

dhcp lease expired? no dhcp daemon running?

Comment 10 Darryl Bond 2015-04-14 21:14:56 UTC
> dhcp lease expired? no dhcp daemon running?
dhclient is running. The system lease time is shared for all iSCSI boot boxes, the ones that were built do not exhibit the behaviour. The fact that the VM can be pinged from outside indicates thet the network stack is still up


The interface doesn't have a timeout.
2: ibft0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:94:4f:f0 brd ff:ff:ff:ff:ff:ff
    inet 10.6.6.82/16 brd 10.6.255.255 scope global ibft0
       valid_lft forever preferred_lft forever



[root@localhost network-scripts]# systemctl status NetworkManager
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Wed 2015-04-15 07:05:27 AEST; 4min 50s ago
 Main PID: 723 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─ 723 /usr/sbin/NetworkManager --no-daemon
           └─1242 /sbin/dhclient -d -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-ens192.pid -lf /var/lib/NetworkManager/dhclient-49abdca6-7015-4f8a-8335-bd59da6393f3-ens192.lease -cf /var/lib/NetworkManager/dhclient-ens192.conf ens192

Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info>   domain name 'gps.local'
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> Activation (ens192) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> Activation (ens192) Stage 5 of 5 (IPv4 Commit) started...
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> (ens192): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> Activation (ens192) Stage 5 of 5 (IPv4 Commit) complete.
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> (ens192): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> (ens192): device state change: secondaries -> activated (reason 'none') [90 100 0]
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <info> Activation (ens192) successful, device activated.
Apr 15 07:05:31 localhost.localdomain NetworkManager[723]: <warn> Dispatcher script "/etc/NetworkManager/dispatcher.d/20-chrony" failed with timed out: Script '/etc/NetworkManager/dispatcher.d/20-chrony' timed out.
Apr 15 07:05:32 localhost.localdomain NetworkManager[723]: <info> startup complete

Comment 11 Darryl Bond 2015-04-14 21:53:23 UTC
> Are these rpms installed?
> iscsi-initiator-utils
> hostname

It was missing iscsi-initiator-utils. That seems to have solved it. It generated a correct initrd with the Centos7.1 kernel update. That was without dracut -N, just the normal yum update. Some error messages like what is coming in rawhide will be good.

I will monitor to see if it continues to drop the disk overnight.

Comment 14 Marek Hruscak 2016-09-06 12:27:17 UTC
Dracut now shows info message about where is problem if it cannot boot with root on iSCSI target. This behaviour should be sufficient for user as notification to install correct packages and add right modules before creating initramdisk.img, which is able to use root filesystem on iSCSI target.

Comment 16 errata-xmlrpc 2016-11-04 07:57:37 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://rhn.redhat.com/errata/RHBA-2016-2530.html