diff options
-rwxr-xr-x | bin/cloud-init | 1 | ||||
-rw-r--r-- | cloudinit/distros/debian.py | 3 | ||||
-rw-r--r-- | cloudinit/stages.py | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/bin/cloud-init b/bin/cloud-init index 341359e3..715be4b5 100755 --- a/bin/cloud-init +++ b/bin/cloud-init @@ -259,6 +259,7 @@ def main_init(name, args): util.logexc(LOG, ("No instance datasource found!" " Likely bad things to come!")) if not args.force: + init.apply_network_config() if args.local: return (None, []) else: diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index b14fa3e2..5d7e6cfc 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -82,7 +82,8 @@ class Distro(distros.Distro): ns = net.parse_net_config_data(netconfig) net.render_network_state(target="/", network_state=ns, eni=self.network_conf_fn, - links_prefix=self.links_prefix) + links_prefix=self.links_prefix, + netrules=None) util.del_file("/etc/network/interfaces.d/eth0.cfg") return [] diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 143a4fc9..3fbb4443 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -596,7 +596,13 @@ class Init(object): return LOG.info("Applying network configuration from %s: %s", src, netcfg) - return self.distro.apply_network_config(netcfg) + try: + return self.distro.apply_network_config(netcfg) + except NotImplementedError: + LOG.warn("distro '%s' does not implement apply_network_config. " + "networking may not be configured properly." % + self.distro) + return class Modules(object): |