add INSTANCE_ID to environment of bootcmd scripts
This commit is contained in:
parent
21ce2c796b
commit
794cdb0f61
@ -35,7 +35,9 @@ def handle(name,cfg,cloud,log,args):
|
||||
raise
|
||||
|
||||
try:
|
||||
subprocess.check_call(['/bin/sh'], stdin=tmpf)
|
||||
env=os.environ.copy()
|
||||
env['INSTANCE_ID']=cloud.get_instance_id()
|
||||
subprocess.check_call(['/bin/sh'], env=env, stdin=tmpf)
|
||||
tmpf.close()
|
||||
except:
|
||||
log.warn("failed to run commands from bootcmd")
|
||||
|
Loading…
x
Reference in New Issue
Block a user