Merge ~raharper/cloud-init:fix/lp-1766287-detect-unstable-names into cloud-init:master
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 4b1de1d2999f5419486e37cb14da08ea646c50d4 |
Merge reported by: | Scott Moser |
Merged at revision: | 4731c8da25ee9bfbcf0ade1d7ffec95814d8622a |
Proposed branch: | ~raharper/cloud-init:fix/lp-1766287-detect-unstable-names |
Merge into: | cloud-init:master |
Diff against target: |
316 lines (+165/-16) 7 files modified
cloudinit/config/cc_disk_setup.py (+4/-8) cloudinit/net/__init__.py (+26/-0) cloudinit/net/tests/test_init.py (+1/-0) cloudinit/sources/DataSourceAltCloud.py (+1/-4) cloudinit/tests/test_util.py (+49/-0) cloudinit/util.py (+15/-0) tests/unittests/test_net.py (+69/-4) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Scott Moser | Approve | ||
Review via email: mp+344339@code.launchpad.net |
Commit message
net: detect unstable network names and trigger a settle if needed
The cloud-init-
have already been completed by the kernel or udev daemon.
In some situations we've found that the renaming of interfaces from kernel
names (eth0, eth1, etc) to their persistent names (eno1, ens3, enp0s1,
etc) may happen after cloud-init-local has started where it reads values
from sysfs about what network devices are present, and which device to use
as a fallback nic.
Subsequently, cloud-init-local would write out network configuration for a
kernel device name which would no longer be present by the time that
networking services start to bring up the devices. The result is that the
instance does not get networking configured. Prior to use of
systemd-networkd, the Ubuntu 'networking.
udevadm settle which is why this race is not seen on a Xenial system.
This change adds the ability to detect if an interface has a stable name,
if if we find one without stable names and stable names have not been
disabled (net.ifnames=0 in /proc/cmdline), then cloud-init will invoke
udevadm settle.
LP: #1766287
FAILED: Continuous integration, rev:8a7f6127fc4 a9f31039dd51a4e f40187714b1d37 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1060/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
FAILED: Ubuntu LTS: Build
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1060/rebuild
https:/