Cloud-init should not setup ephemeral ipv4 if apply_network_config is False for OpenStack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned |
Bug Description
As fixed in bug #1749717, cloud-init will attempt to configure an ephemeral ipv4 address on the first interface to fetch OpenStack (and probably others) networking config via a metadata URL.
There's a couple of issues with this implementation that affect our OpenStack cloud.
Access to our metadata server on 169.254.169.254 is delivered by an additional route delivered by DHCP, which is not configured via cloud-init's dhcp.py (that is probably another bug).
Also, we needed to bump up the timeouts for accessing our metadata, as we're a largeish cloud and the defaults were way too low. We actually copied the timeout/retry values from the Ec2 Datasource.
So the result is that users are left waiting for cloud-init-local stage to timeout, as the additional route to the metadata server isn't configured, which was 2 mins in our config.
I believe a simple fix for this situation would be to skip the ephemeral ipv4 setup if the datastore config has apply_network_
Related branches
- Dan Watkins: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 407 lines (+286/-6)6 files modifiedcloudinit/net/__init__.py (+32/-2)
cloudinit/net/dhcp.py (+90/-0)
cloudinit/net/tests/test_dhcp.py (+119/-1)
cloudinit/net/tests/test_init.py (+39/-0)
tests/unittests/test_datasource/test_azure.py (+4/-2)
tests/unittests/test_datasource/test_ec2.py (+2/-1)
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Pending requested
-
Diff: 15 lines (+4/-0)1 file modifiedcloudinit/sources/DataSourceOpenStack.py (+4/-0)
Changed in cloud-init: | |
status: | Incomplete → New |
Changed in cloud-init: | |
status: | Expired → Confirmed |
Changed in cloud-init: | |
status: | Incomplete → Triaged |
Changed in cloud-init: | |
status: | Incomplete → Triaged |
Thank you for filing a bug.
Would you be able to provide the output from 'cloud-init collect-logs' and attach the tarball?