Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1201035 - Cannot create a suitable iSCSI boot initramfs after migration from disk boot
Summary: Cannot create a suitable iSCSI boot initramfs after migration from disk boot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1289485 1313485
TreeView+ depends on / blocked
 
Reported: 2015-03-11 22:04 UTC by Darryl Bond
Modified: 2017-01-05 15:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 07:57:37 UTC
Target Upstream Version:


Attachments (Terms of Use)
Compressed Log of dracut debug output (727.96 KB, application/x-gzip)
2015-03-16 21:26 UTC, Darryl Bond
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2530 0 normal SHIPPED_LIVE dracut bug fix and enhancement update 2016-11-03 14:17:01 UTC

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


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