View Issue Details

IDProjectCategoryView StatusLast Update
0016933CentOS-8cloud-initpublic2020-06-02 20:38
ReporterIcePic 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product Version8.1.1911 
Target VersionFixed in Version 
Summary0016933: cloud-init crashes on "unknown" network type.
DescriptionAs seen on this old bug from 2017*, the cloud-init script has "problems" with checking for the network type, and crashes if it is one of these, instead of .. just accepting unknown types and moving on.

Quote from the 2017 ticket:
--------
  This would also occur when the type of the network device as declared
 to cloud-init was 'hw_veb', 'hyperv', 'vhostuser' or 'vrouter'.
-------

We run openstack with "vrouter" networking.

* https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg5177252.html
Steps To ReproduceHave openstack or other virtualization clusters with one of the software defined network techs mentioned above, notice how cloud-init crashes at all points, making your VM unusable due to no user ssh key import, and no way to log in over console.
Additional InformationFull dmesg attached as file.

hopefully relevant part of dmesg when booting 8.1 GenericCloud 1911:

..
[ 54.551845] cloud-init[807]: Cloud-init v. 18.5 running 'init' at Thu, 16 Jan 2020 08:49:00 +0000. Up 54.46 seconds.
[ 54.553185] cloud-init[807]: ci-info: ++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++
[ 54.554400] cloud-init[807]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+
[ 54.555626] cloud-init[807]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 54.556829] cloud-init[807]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+
[ 54.558351] cloud-init[807]: ci-info: | eth0 | True | 192.168.0.20 | 255.255.255.0 | global | 02:4e:37:9e:70:2f |
[ 54.559576] cloud-init[807]: ci-info: | eth0 | True | fe80::4e:37ff:fe9e:702f/64 | . | link | 02:4e:37:9e:70:2f |
[ 54.560797] cloud-init[807]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
[ 54.562418] cloud-init[807]: ci-info: | lo | True | ::1/128 | . | host | . |
[ 54.563980] cloud-init[807]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+
[ 54.565190] cloud-init[807]: ci-info: +++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++
[ 54.566324] cloud-init[807]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
[ 54.567442] cloud-init[807]: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
[ 54.568541] cloud-init[807]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
[ 54.569655] cloud-init[807]: ci-info: | 0 | 0.0.0.0 | 192.168.0.1 | 0.0.0.0 | eth0 | UG |
[ 54.570746] cloud-init[807]: ci-info: | 1 | 192.168.0.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
[ 54.571837] cloud-init[807]: ci-info: +-------+-------------+-------------+---------------+-----------+-------+
[ 54.572937] cloud-init[807]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[ 54.573890] cloud-init[807]: ci-info: +-------+-------------+---------+-----------+-------+
[ 54.574813] cloud-init[807]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[ 54.575744] cloud-init[807]: ci-info: +-------+-------------+---------+-----------+-------+
[ 54.576715] cloud-init[807]: ci-info: | 1 | fe80::/64 | :: | eth0 | U |
[ 54.577675] cloud-init[807]: ci-info: | 3 | ff00::/8 | :: | eth0 | U |
[ 54.578628] cloud-init[807]: ci-info: +-------+-------------+---------+-----------+-------+
[ 54.579632] cloud-init[807]: 2020-01-16 08:49:00,232 - util.py[WARNING]: failed stage init
[ 54.580590] cloud-init[807]: failed run of stage init
[ 54.581308] cloud-init[807]: ------------------------------------------------------------
[ 54.582245] cloud-init[807]: Traceback (most recent call last):
[ 54.583013] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper
[ 54.584146] cloud-init[807]: ret = functor(name, args)
[ 54.584857] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 362, in main_init
[ 54.585973] cloud-init[807]: init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
[ 54.587012] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 649, in apply_network_config
[ 54.588180] cloud-init[807]: netcfg, src = self._find_networking_config()
[ 54.589053] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 636, in _find_networking_config
[ 54.590234] cloud-init[807]: if self.datasource and hasattr(self.datasource, 'network_config'):
[ 54.591244] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOpenStack.py", line 115, in network_config
[ 54.592525] cloud-init[807]: self.network_json, known_macs=None)
[ 54.593308] cloud-init[807]: File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py", line 645, in convert_net_json
[ 54.594592] cloud-init[807]: 'Unknown network_data link type: %s' % link['type'])
[ 54.595490] cloud-init[807]: ValueError: Unknown network_data link type: vrouter
[ 54.596359] cloud-init[807]: ------------------------------------------------------------
[[0;1;31mFAILED[0m] Failed to start Initial cloud-init job (metadata service crawler).
Tagscloud-init

Activities

IcePic

IcePic

2020-01-16 09:15

reporter  

centos8.1-cloudinit-crash-dmesg.xz (13,300 bytes)
imtiaz.chowdhury

imtiaz.chowdhury

2020-06-02 20:38

reporter   ~0037028

This seems to be a bug introduced in new version of cloud-init. Please check https://bugs.launchpad.net/cloud-init/+bug/1881806 for more details.

Issue History

Date Modified Username Field Change
2020-01-16 09:15 IcePic New Issue
2020-01-16 09:15 IcePic File Added: centos8.1-cloudinit-crash-dmesg.xz
2020-01-16 09:15 IcePic Tag Attached: cloud-init
2020-06-02 20:38 imtiaz.chowdhury Note Added: 0037028