From 0fc5c222d2ff335b9a1de3e910bb8822b6d73031 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 1 Jun 2016 17:17:11 -0400 Subject: cloudinit/stages.py: if no datasource found, do not attempt is_new_instance if local does not find a datasource, then we try to apply networking. but that would then hit the NULL_DATA_SOURCE which does not work with is_new_instance. avoid that. --- cloudinit/stages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 211d2286..5756e74d 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -638,7 +638,8 @@ class Init(object): except Exception as e: LOG.warn("Failed to rename devices: %s", e) - if not self.is_new_instance(): + if (self.datasource is not NULL_DATA_SOURCE and + not self.is_new_instance()): LOG.debug("not a new instance. network config is not applied.") return -- cgit v1.2.3