diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-06-01 17:17:11 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-06-01 17:17:11 -0400 |
commit | 0fc5c222d2ff335b9a1de3e910bb8822b6d73031 (patch) | |
tree | 2212c20f092dbcdd6b2ab06f765d979741522e20 | |
parent | f67e8f104b199c9402cf047637b939516526e0ac (diff) | |
download | vyos-cloud-init-0fc5c222d2ff335b9a1de3e910bb8822b6d73031.tar.gz vyos-cloud-init-0fc5c222d2ff335b9a1de3e910bb8822b6d73031.zip |
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.
-rw-r--r-- | cloudinit/stages.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |