cloud-init fails to detect iSCSI root on focal Oracle instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Invalid
|
Undecided
|
Dan Watkins | ||
open-iscsi (Ubuntu) |
Fix Released
|
Undecided
|
Dan Watkins | ||
Bionic |
Fix Released
|
High
|
Jorge Merlino | ||
Focal |
Fix Released
|
Undecided
|
Dan Watkins |
Bug Description
[Impact]
When creating a bare metal instance on Oracle Cloud (which are backed by an iscsi disk), the IP address is configured on an interface (enp45s0f0) on boot, but cloud-init is generating a /etc/netplan/
This is caused by a missing /run/initramfs/
[Fix]
There is a script from the open-iscsi package that checks if there are no iscsi disks present and if there are no disks removes the /run/initramfs/
This script originally runs along the local-top initrd scripts but uses the /dev/disk/by-path/ path to find if there are iscsi discs present. This path does not yet exists when the local-top scripts are run so the file is always removed.
This was fixed in Focal by moving the script to run along the local-bottom scripts. When these scripts run the /dev/disk/by-path/ path exists.
[Test Plan]
This can be reproduced by instancing any bare metal instance on Oracle Cloud (all are backed by an iscsi disk) and checking if the /run/initramfs/
[Where problems could occur]
There should be no problems as the script runs anyway but later into the boot process.
If the script fails to run it could leave the open-iscsi.
[Original description]
Currently focal images on Oracle are failing to get data from the Oracle DS with this traceback:
Traceback (most recent call last):
File "/usr/lib/
if s.update_
File "/usr/lib/
result = self.get_data()
File "/usr/lib/
return_value = self._get_data()
File "/usr/lib/
with dhcp.EphemeralD
File "/usr/lib/
return self.obtain_lease()
File "/usr/lib/
ephipv4.
File "/usr/lib/
self.
File "/usr/lib/
util.subp(
File "/usr/lib/
raise ProcessExecutio
cloudinit.
Command: ['ip', '-4', 'route', 'add', '0.0.0.0/0', 'via', '10.0.0.1', 'dev', 'ens3']
Exit code: 2
Reason: -
Stdout:
Stderr: RTNETLINK answers: File exists
In https:/
Related branches
- Lucas Kanashiro (community): Approve
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 5472 lines (+4979/-71)25 files modifieddebian/changelog (+1135/-0)
debian/control (+9/-7)
debian/extra/initramfs.hook (+1/-1)
debian/extra/initramfs.local-bottom (+20/-0)
debian/extra/initramfs.local-top (+30/-2)
debian/extra/net-interface-handler (+80/-0)
debian/iscsi-network-interface.rules (+3/-0)
debian/iscsid.service (+1/-1)
debian/open-iscsi.finalrd (+40/-0)
debian/open-iscsi.postinst (+25/-40)
debian/open-iscsi.service (+6/-6)
debian/patches/lp1755858-default-iscsid_conf-to-iscsid_socket.patch (+25/-0)
debian/patches/series (+1/-0)
debian/rules (+30/-10)
debian/tests/README-boot-test.md (+139/-0)
debian/tests/control (+4/-0)
debian/tests/get-image (+227/-0)
debian/tests/install (+5/-2)
debian/tests/patch-image (+374/-0)
debian/tests/test-open-iscsi.py (+426/-0)
debian/tests/testlib.py (+1153/-0)
debian/tests/testsuite (+7/-0)
debian/tests/tgt-boot-test (+534/-0)
debian/tests/xkvm (+704/-0)
dev/null (+0/-2)
- Bryce Harrington (community): Approve
- Canonical Server: Pending requested
- Rafael David Tinoco: Pending requested
-
Diff: 24923 lines (+4835/-457)29 files modifieddebian/changelog (+987/-0)
debian/control (+4/-2)
debian/extra/initramfs.hook (+1/-1)
debian/extra/initramfs.local-bottom (+20/-0)
debian/extra/initramfs.local-top (+30/-2)
debian/extra/net-interface-handler (+80/-0)
debian/iscsi-network-interface.rules (+3/-0)
debian/iscsid.service (+1/-1)
debian/open-iscsi.finalrd (+40/-0)
debian/open-iscsi.postinst (+25/-40)
debian/open-iscsi.service (+6/-6)
debian/patches/lp1755858-default-iscsid_conf-to-iscsid_socket.patch (+30/-0)
debian/patches/series (+1/-0)
debian/rules (+27/-8)
debian/tests/README-boot-test.md (+139/-0)
debian/tests/control (+4/-0)
debian/tests/get-image (+227/-0)
debian/tests/install (+5/-2)
debian/tests/patch-image (+374/-0)
debian/tests/test-open-iscsi.py (+426/-0)
debian/tests/testlib.py (+1153/-0)
debian/tests/testsuite (+7/-0)
debian/tests/tgt-boot-test (+534/-0)
debian/tests/xkvm (+704/-0)
dev/null (+0/-395)
iscsiuio/src/.gitignore (+1/-0)
iscsiuio/src/unix/.gitignore (+1/-0)
test/.gitignore (+3/-0)
test/harness/.gitignore (+2/-0)
Changed in cloud-init: | |
status: | In Progress → Invalid |
tags: | added: id-5bbe5d6e338b8e69a2c66363 |
Changed in open-iscsi (Ubuntu Bionic): | |
assignee: | nobody → Jorge Merlino (jorge-merlino) |
tags: | added: sts-sponsor-halves |
description: | updated |
The following conditions must currently be met for cloud-init to detect iSCSI root (symbols are in cloudinit. net.cmdline unless otherwise specified):
* _get_klibc_ net_cfg_ files() must return something; it's implementation is: return glob.glob( '/run/net- *.conf' ) + glob.glob( '/run/net6- *.conf' )
AND one of
* 'ip=' in self._cmdline or 'ip6=' in self._cmdline (where self._cmdline is the kernel cmdline) open-iscsi. interface exists
* /run/initramfs/