cloud-init fails to run on latest cosmic minimal image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-images |
High
|
Scott Moser | ||
| cloud-init (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
When cloud-init runs in the latest cosmic minimal image, we see the following traceback:
cloud-init[108]: Traceback (most recent call last):
cloud-init[108]: File "/usr/lib/
cloud-init[108]: ret = functor(name, args)
cloud-init[108]: File "/usr/lib/
cloud-init[108]: init.apply_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: netcfg, src = self._find_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: if self.datasource and hasattr(
cloud-init[108]: File "/usr/lib/
cloud-init[108]: self.network_json, known_macs=None)
cloud-init[108]: File "/usr/lib/
cloud-init[108]: known_macs = net.get_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: (name, ret[mac], mac))
cloud-init[108]: RuntimeError: duplicate mac found! both 'sit0' and 'tunl0' have mac '00:00:00:00'
It appears that the devices presented by the latest linux-kvm is now different; this is the table output by cloud-init in the previous minimal image:
+++++++
+------
| Device | Up | Address | Mask | Scope | Hw-Address |
+------
| ens2 | True | 10.220.168.37 | 255.255.255.0 | global | fa:16:3e:ef:89:9a |
| ens2 | True | fe80::f816:
| lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
| lo | True | ::1/128 | . | host | . |
| sit0 | False | . | . | . | . |
+------
Whereas the new image shows:
+++++++
+------
| Device | Up | Address | Mask | Scope | Hw-Address |
+------
| ens2 | False | . | . | . | fa:16:3e:15:a7:3b |
| lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
| lo | True | ::1/128 | . | host | . |
| sit0 | False | . | . | . | . |
| tunl0 | False | . | . | . | . |
+------
Specifically, the tunl0 device has been added.
Related branches
- Server Team CI bot: Approve (continuous-integration) on 2018-10-09
- Scott Moser: Approve on 2018-10-09
-
Diff: 2628 lines (+1096/-307)42 files modifiedcloudinit/cmd/cloud_id.py (+90/-0)
cloudinit/cmd/tests/test_cloud_id.py (+127/-0)
cloudinit/net/__init__.py (+4/-2)
cloudinit/sources/DataSourceAliYun.py (+5/-15)
cloudinit/sources/DataSourceAltCloud.py (+22/-11)
cloudinit/sources/DataSourceAzure.py (+8/-0)
cloudinit/sources/DataSourceBigstep.py (+4/-0)
cloudinit/sources/DataSourceCloudSigma.py (+5/-1)
cloudinit/sources/DataSourceConfigDrive.py (+12/-0)
cloudinit/sources/DataSourceEc2.py (+59/-56)
cloudinit/sources/DataSourceIBMCloud.py (+4/-0)
cloudinit/sources/DataSourceMAAS.py (+4/-0)
cloudinit/sources/DataSourceNoCloud.py (+21/-0)
cloudinit/sources/DataSourceNone.py (+4/-0)
cloudinit/sources/DataSourceOVF.py (+6/-0)
cloudinit/sources/DataSourceOpenNebula.py (+8/-0)
cloudinit/sources/DataSourceOracle.py (+4/-0)
cloudinit/sources/DataSourceSmartOS.py (+3/-0)
cloudinit/sources/__init__.py (+104/-21)
cloudinit/sources/tests/test_init.py (+83/-3)
cloudinit/sources/tests/test_oracle.py (+8/-0)
cloudinit/tests/test_util.py (+16/-0)
cloudinit/util.py (+5/-0)
debian/changelog (+11/-0)
doc/rtd/topics/instancedata.rst (+137/-46)
setup.py (+2/-1)
templates/sources.list.ubuntu.tmpl (+17/-17)
tests/cloud_tests/testcases/base.py (+11/-2)
tests/cloud_tests/testcases/modules/apt_configure_primary.py (+9/-5)
tests/cloud_tests/testcases/modules/apt_configure_primary.yaml (+0/-7)
tests/unittests/test_datasource/test_aliyun.py (+4/-0)
tests/unittests/test_datasource/test_altcloud.py (+67/-51)
tests/unittests/test_datasource/test_azure.py (+63/-47)
tests/unittests/test_datasource/test_cloudsigma.py (+6/-0)
tests/unittests/test_datasource/test_configdrive.py (+3/-0)
tests/unittests/test_datasource/test_ec2.py (+13/-7)
tests/unittests/test_datasource/test_ibmcloud.py (+39/-1)
tests/unittests/test_datasource/test_nocloud.py (+35/-10)
tests/unittests/test_datasource/test_opennebula.py (+4/-0)
tests/unittests/test_datasource/test_ovf.py (+48/-4)
tests/unittests/test_datasource/test_smartos.py (+7/-0)
tests/unittests/test_net.py (+14/-0)
- Server Team CI bot: Approve (continuous-integration) on 2018-10-09
- Chad Smith: Approve on 2018-10-09
- Ryan Harper: Approve on 2018-10-09
-
Diff: 52 lines (+18/-2)2 files modifiedcloudinit/net/__init__.py (+4/-2)
tests/unittests/test_net.py (+14/-0)
- Chad Smith: Approve on 2019-01-28
- Server Team CI bot: Approve (continuous-integration) on 2019-01-08
- Scott Moser: Needs Fixing on 2018-10-10
- Scott Moser [2]: Pending requested 2018-10-09
-
Diff: 66 lines (+15/-3)2 files modifiedsetup.py (+10/-3)
systemd/cloud-init-generator.tmpl (+5/-0)
Dan Watkins (oddbloke) wrote : | #1 |
description: | updated |
Changed in cloud-images: | |
importance: | Undecided → High |
Chad Smith (chad.smith) wrote : | #2 |
Can we get the network configuration passed to this instance or the cloud-init.logs.tar it might shed more light on a configuration that we need to take into account in cloud-init. We can certainly attempt to ignore duplicate mac checks in cloud-init if macs are returned as 6-tuple of 00. But we probably want to make sure we are also understanding the full network config in this case too.
Chad Smith (chad.smith) wrote : | #3 |
cloud-init collect-logs would harvest a tarfile of all cloud-init artifacts.
Changed in cloud-images: | |
status: | New → In Progress |
assignee: | nobody → Scott Moser (smoser) |
This bug is fixed with commit 00e36d3d to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-images: | |
status: | In Progress → Fix Committed |
Changed in cloud-images: | |
status: | Fix Committed → Fix Released |
panticz.de (panticz.de) wrote : | #5 |
The Ubuntu 18.04 minimal cloud image from 22-Nov-2018 20:29 (https:/
is still affected from this issue:
cloud-init[108]: Cloud-init v. 18.4-0ubuntu1~
cloud-init[108]: 2018-12-03 08:49:27,381 - util.py[WARNING]: failed stage init-local
cloud-init[108]: failed run of stage init-local
cloud-init[108]: -------
cloud-init[108]: Traceback (most recent call last):
cloud-init[108]: File "/usr/lib/
cloud-init[108]: ret = functor(name, args)
cloud-init[108]: File "/usr/lib/
cloud-init[108]: init.apply_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: netcfg, src = self._find_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: if self.datasource and hasattr(
cloud-init[108]: File "/usr/lib/
cloud-init[108]: self.network_json, known_macs=
cloud-init[108]: File "/usr/lib/
cloud-init[108]: known_macs = net.get_
cloud-init[108]: File "/usr/lib/
cloud-init[108]: (name, ret[mac], mac))
cloud-init[108]: RuntimeError: duplicate mac found! both 'sit0' and 'tunl0' have mac '00:00:00:00'
cloud-init[108]: -------
[[0;1;31mFAILED[0m] Failed to start Initial cloud-init job (pre-networking).
Changed in cloud-init (Ubuntu): | |
status: | New → Fix Released |
Changed in cloud-init (Ubuntu): | |
status: | Fix Released → Fix Committed |
Changed in cloud-init (Ubuntu): | |
status: | Fix Committed → Fix Released |
It's not clear to me whether this is a cloud-init bug or a kernel bug, so I've filed it in cloud-images for triage for now.