iBFT network configuration does not correctly populate PROTO=dhcp in /run/net-*.conf which breaks cloud-init
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
open-iscsi (Debian) |
Fix Released
|
Unknown
|
|||
open-iscsi (Ubuntu) |
Fix Released
|
Medium
|
Trent Lloyd | ||
Xenial |
Fix Released
|
Medium
|
Trent Lloyd | ||
Yakkety |
Won't Fix
|
Medium
|
Trent Lloyd | ||
Zesty |
Fix Released
|
Medium
|
Trent Lloyd | ||
Artful |
Fix Released
|
Medium
|
Trent Lloyd |
Bug Description
[Impact]
When booting with iBFT, the network configuration is performed by open-iscsi as part of initramfs.local-top instead of by klibc-ipconfig. 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.
Further to this, open-iscsi in the current version (xenial through zesty) does not correctly parse the iBFT origin into the boot protocol in "iscsistart -f" and always returns "STATIC". This is fixed upstream.
[Test Case]
(1) Setup MAAS 2 environment. Install 16.04 LTS images from the "Daily" Stream. Check settings and ensure Commissioning kernel is 16.04 LTS and "xenial (ga-16.04)"
(2) Enroll a libvirt virtual machine as a machine within the MAAS including a SINGLE local disk
(3) Install the 'ipxe' package on your libvirt machine
(4) Commission and test and ensure it's otherwise working
(5) Update MAAS settings and add iscsi_auto to the "Global Kernel Parameters"
(6) You need to build a new open-iscsi package for xenial with the fix, and then rebuild an initrd for 4.4.0-87-generic with the fix integrated. An easy way to do that is to deploy the machine, install the updated (fixed) package and then copy the initrd from /boot/initrd.
(7) Edit the virtual machine config using virt-manager and under the "Boot Options" enable direct kernel boot, set kernel path to /usr/lib/
ifconf -c dhcp && sanhook --drive 0x81 iscsi:100.
Change 100.64.0.253 to the IP of your MAAS instance on the network that it uses to PXE boot.
(8) Try to commission the machine again, you should see it fail if you watch the console (it will also show failed in MAAS) and you'll briefly see a message about PROTO=none
(9) Update the initrd on the MAAS server:
cd /var/lib/
mv boot-initrd boot-initrd.orig
cp (PATHMAYBEDIFFE
(10) Try to commission the machine again, it should now succeed with the patched initrd. A deployment will also work but a commission is sufficient enough to test.
Notes:
- MAAS may do an image sync and overwrite your updated initrd. So watch out for that. boot-resources/
- Advantage of using MAAS to do this is that it also tests that iSCSI boot is otherwise working and not broken by this change, as the commission and deploy etc use iSCSI root. There is also a test for this in debian/tests (tgt-boot-test)
[Regression Potential]
We believe the regression risk is "low" and don't envision any.
The package (including the fixes) has been intensively tested pre-SRU.
If regression is found, it'll be clearly less critical than this actual bug where cloud-init breaks because of this actual missing piece of code and It'll most likely only affect system booting with iBFT.
Additionally, the patches has been proven to work Upstream and Debian for a couple of years now.
* autopkgtest failure
==
XENIAL
==
* Regression in autopkgtest for open-iscsi (i386): test log
This autopkgtest started to fail more than a year ago, more precisely on "2016-03-30"[1] with open-iscsi version : "2.0.873+
Meaning that this was already there prior to this current SRU.
[1] - http://
2.0.873+
* Regression in autopkgtest for open-iscsi (amd64): test log
This autopkgtest started to fail more than a year ago, more precisely on "2016-04-13"[2] with open-iscsi version : "2.0.873+
Meaning that this was already there prior to this current SRU.
[2] - http://
2.0.873+
==
[Other Info]
* This SRU includes the following upstream/debian fixes :
# Debian:
0347300 initramfs: populate PROTO= entry in /run/net-*.conf from iBFT
# Upstream
- 08_Parse-
- 09_Represent-
- 10_iBFT-
[Original Description]
When booting with iBFT, the network configuration is performed by open-iscsi as part of initramfs.local-top instead of by klibc-ipconfig. 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.
Further to this, open-iscsi in the current version (xenial through zesty) does not correctly parse the iBFT origin into the boot protocol in "iscsistart -f" and always returns "STATIC". This is fixed upstream.
Changed in open-iscsi (Ubuntu): | |
importance: | Undecided → Medium |
Changed in open-iscsi (Ubuntu): | |
assignee: | nobody → Trent Lloyd (lathiat) |
Changed in open-iscsi (Ubuntu Zesty): | |
assignee: | nobody → Trent Lloyd (lathiat) |
Changed in open-iscsi (Ubuntu Yakkety): | |
assignee: | nobody → Trent Lloyd (lathiat) |
Changed in open-iscsi (Ubuntu Xenial): | |
assignee: | nobody → Trent Lloyd (lathiat) |
importance: | Undecided → Medium |
Changed in open-iscsi (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
Changed in open-iscsi (Ubuntu Zesty): | |
importance: | Undecided → Medium |
Changed in open-iscsi (Debian): | |
status: | Unknown → Confirmed |
Changed in open-iscsi (Debian): | |
status: | Confirmed → Fix Released |
Changed in open-iscsi (Ubuntu Artful): | |
status: | New → In Progress |
Changed in open-iscsi (Ubuntu Artful): | |
assignee: | Trent Lloyd (lathiat) → Eric Desrochers (slashd) |
description: | updated |
Changed in open-iscsi (Ubuntu Zesty): | |
status: | New → In Progress |
Changed in open-iscsi (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in open-iscsi (Ubuntu Artful): | |
assignee: | Eric Desrochers (slashd) → Trent Lloyd (lathiat) |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-xenial removed: verification-needed verification-needed-xenial |
tags: | added: verification-done-zesty |
Changed in open-iscsi (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
tags: |
added: sts removed: sts-sru-needed |
Proposed patch for Review
First cherry-pick 3 upstream patches to fix parsing of the iBFT origin and return DHCP correctly in 'iscsistart -f' output. We then modify initramfs-local.top to use his information.
I do need to check this with IPv6. Both DHCP and STATIC from iscsistart convert direct to PROTO= but need to check what will happen for DHCPv6 and IPv6-RA
I refrained from removing the default PROTO=none at this stage. cloud-init doesn't like this value but it's not clear to me currently who defines what values are acceptable here. klibc-ipconfig appears to never write none.
open-iscsi (2.0.873+ git0.3b4b4500- 14ubuntu3. 4) xenial; urgency=medium
* debian/ patches/ 08_Parse- origin- value-from- iBFT.patch, Represent- DHCP-origin- as-an-enum- not-a-string. patch, iBFT-origin- is-an-enum- not-a-string. patch: Cherry pick upstream patches extra/initramfs .local- top: parse iface.bootproto and populate PROTO
09_
10_
to parse IP origin passed in by IBFT. iscsistart -f will now display the
correct iface.bootproto
* debian/
in /run/net-*.conf with this information after lowercasing the string.
-- Trent Lloyd <email address hidden> Wed, 19 Apr 2017 05:53:25 +0800