Scott Moser aef06d4f60 improve debug via _CLOUD_INIT_SAVE_STDIN and _CLOUD_INIT_SAVE_STDOUT
This does 2 things:
 a.) fixes broken logic in 'close_stdin'
     previously _CLOUD_INIT_SAVE_STDIN had to be set to false to
     preserve stdin.  "save_stdin" should be true to indicate it
     should be saved.

The net result is that you can stuff just add
 import pdb; pdb.set_trace()
to code, and then run something like:
 sudo _CLOUD_INIT_SAVE_STDIN=1 _CLOUD_INIT_SAVE_STDOUT=1 \
   cloud-init single --name=mounts --frequency=always

And enter the debugger even if you had a 'output' that would redirect
stdin/out by default, like:
   output: {all: '| tee -a /var/log/cloud-init-output.log'}
2012-07-16 16:46:22 -04:00
2011-09-21 15:08:17 -04:00
Description
RETIRED, Cross-platform instance initialization
4 MiB