summaryrefslogtreecommitdiff
path: root/cloudinit/cmd/main.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-11-17 14:46:23 -0500
committerScott Moser <smoser@brickies.net>2016-11-18 16:33:51 -0500
commit9e904bbc3336b96475bfd00fb3bf1262ae4de49f (patch)
treee22e9c0048d723f1b4d99634969a760c34d8da22 /cloudinit/cmd/main.py
parent9d826b8855797bd37e477b6da43153c49529afe8 (diff)
downloadvyos-cloud-init-9e904bbc3336b96475bfd00fb3bf1262ae4de49f.tar.gz
vyos-cloud-init-9e904bbc3336b96475bfd00fb3bf1262ae4de49f.zip
Add activate_datasource, for datasource specific code paths.
This adds a call to 'activate_datasource'. That will be called during init stage (or init-local in the event of a 'local' dsmode). It is present so that the datasource can do platform specific operations that may be necessary. It is passed the fully rendered cloud-config and whether or not the instance is a new instance. The Azure datasource uses this to address formatting of the ephemeral devices. It does so by a.) waiting for the device to come online b.) removing the marker files for the disk_setup and mounts modules if it finds that the ephemeral device has been reset. LP: #1611074
Diffstat (limited to 'cloudinit/cmd/main.py')
-rw-r--r--cloudinit/cmd/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/cmd/main.py b/cloudinit/cmd/main.py
index 83eb02c9..fe37075e 100644
--- a/cloudinit/cmd/main.py
+++ b/cloudinit/cmd/main.py
@@ -326,6 +326,9 @@ def main_init(name, args):
util.logexc(LOG, "Failed to re-adjust output redirection!")
logging.setupLogging(mods.cfg)
+ # give the activated datasource a chance to adjust
+ init.activate_datasource()
+
# Stage 10
return (init.datasource, run_module_section(mods, name, name))