Source: open-iscsi Severity: normal Tags: patch When booting with iBFT, the network configuration is performed by open-iscsi as part of initramfs.local-top instead of by klibc-ipconfig as it would be during for example a PXE boot. This includes populating /run/net-*.conf which is consumed among other things, by cloud-init.
Currently no attempt to determine PROTO is made, and PROTO=none is hard coded into the file which cloud-init does not recognise and crashes out. Recent versions of open-iscsi (such as that currently in unstable) correctly export this information from "iscsistart -f" so I am attaching a patch to export that information into /run/net-*.conf The approach I took is simply to take the output from iscsistart (which as best I can tell will be either 'dhcp' or 'static' and then pipe it through 'tr' to lowercase it to match the output created by klibc-ipconfig. I could not find a specific standard on the format of /run/net-*.conf so that was the best I could go with. It works at least for the 2 most likely situations of dhcp/static. This requires a new-ish (last couple years) version of open-iscsi but that is already in debian unstable [would only matter if someone attempted to backport this functionality, probably irrelevant for this bug] If you want to test this, it is possible to simulate an iBFT environment using qemu & iPXE with a "kernel command line" or manually entering a script similar to the following: ifconf -c dhcp && set username x && set password x && sanhook --drive 0x80 iscsi:100.64.1.254::3261:0:iqn.2017-04.net.lathiat:target1 || prompt ; autoboot Cheers, Trent -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.11.0-8-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru open-iscsi-2.0.874/debian/extra/initramfs.local-top open-iscsi-2.0.874/debian/extra/initramfs.local-top --- open-iscsi-2.0.874/debian/extra/initramfs.local-top 2017-05-10 00:23:32.000000000 +0800 +++ open-iscsi-2.0.874/debian/extra/initramfs.local-top 2017-06-23 16:32:53.000000000 +0800 @@ -159,6 +159,7 @@ iface.primary_dns) IPV4DNS0="${v}" ;; iface.secondary_dns) IPV4DNS1="${v}" ;; iface.net_ifacename) DEVICE="${v}" ;; + iface.bootproto) PROTO="$(echo ${v} | tr '[:upper:]' '[:lower:]')" ;; esac done fi