diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cloud-init | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/cloud-init b/bin/cloud-init index 9dd7296e..fafd176d 100755 --- a/bin/cloud-init +++ b/bin/cloud-init @@ -156,8 +156,8 @@ def main_init(name, args): # 6. Connect to the current instance location + update the cache # 7. Consume the userdata (handlers get activated here) # 8. Construct the modules object - # 9. Adjust any subsequent logging/output redirections using - # the modules objects configuration + # 9. Adjust any subsequent logging/output redirections using the modules + # objects config as it may be different from init object # 10. Run the modules for the 'init' stage # 11. Done! w_msg = welcome_format(name) @@ -268,9 +268,10 @@ def main_init(name, args): except Exception: util.logexc(LOG, "Consuming user data failed!") return 1 - # Stage 8 - TODO - do we really need to re-extract our configs? + + # Stage 8 - re-read and apply relevant cloud-config to include user-data mods = stages.Modules(init, extract_fns(args)) - # Stage 9 - TODO is this really needed?? + # Stage 9 try: outfmt_orig = outfmt errfmt_orig = errfmt @@ -280,6 +281,8 @@ def main_init(name, args): (outfmt, errfmt) = util.fixup_output(mods.cfg, name) except: util.logexc(LOG, "Failed to re-adjust output redirection!") + logging.setupLogging(mods.cfg) + # Stage 10 return run_module_section(mods, name, name) |