cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #06131
[Merge] ~andybotting/cloud-init:openstack-disable-ipv4-on-config into cloud-init:master
Andy Botting has proposed merging ~andybotting/cloud-init:openstack-disable-ipv4-on-config into cloud-init:master.
Commit message:
Disable ephemeral ip setup for OpenStack on config
If apply_network_config is set to False on the OpenStack
datastore, we should not attempt to configure the ephemeral ipv4
address for fetching networking config.
LP: #1821102
Requested reviews:
cloud-init commiters (cloud-init-dev)
Related bugs:
Bug #1821102 in cloud-init: "Cloud-init should not setup ephemeral ipv4 if apply_network_config is False for OpenStack"
https://bugs.launchpad.net/cloud-init/+bug/1821102
For more details, see:
https://code.launchpad.net/~andybotting/cloud-init/+git/cloud-init/+merge/364847
--
Your team cloud-init commiters is requested to review the proposed merge of ~andybotting/cloud-init:openstack-disable-ipv4-on-config into cloud-init:master.
diff --git a/cloudinit/sources/DataSourceOpenStack.py b/cloudinit/sources/DataSourceOpenStack.py
index 4a01524..8214641 100644
--- a/cloudinit/sources/DataSourceOpenStack.py
+++ b/cloudinit/sources/DataSourceOpenStack.py
@@ -127,6 +127,10 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
return False
if self.perform_dhcp_setup: # Setup networking in init-local stage.
+ # Don't setup ephemeral networking if apply_network_config is false
+ if util.is_false(self.ds_cfg.get('apply_network_config', True)):
+ LOG.debug("skipping ephemeral ipv4 setup")
+ return False
try:
with EphemeralDHCPv4(self.fallback_interface):
results = util.log_time(