summaryrefslogtreecommitdiff
path: root/cloudinit/transforms/cc_bootcmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/transforms/cc_bootcmd.py')
-rw-r--r--cloudinit/transforms/cc_bootcmd.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/transforms/cc_bootcmd.py b/cloudinit/transforms/cc_bootcmd.py
index a2efad32..80afb5e7 100644
--- a/cloudinit/transforms/cc_bootcmd.py
+++ b/cloudinit/transforms/cc_bootcmd.py
@@ -30,7 +30,8 @@ frequency = PER_ALWAYS
def handle(name, cfg, cloud, log, _args):
if "bootcmd" not in cfg:
- log.debug("Skipping module named %s, no 'bootcomd' key in configuration", name)
+ log.debug(("Skipping transform named %s,"
+ " no 'bootcomd' key in configuration"), name)
return
with tempfile.NamedTemporaryFile(suffix=".sh") as tmpf:
@@ -39,7 +40,7 @@ def handle(name, cfg, cloud, log, _args):
tmpf.write(content)
tmpf.flush()
except:
- log.warn("Failed to shellify bootcmd")
+ util.logexc(log, "Failed to shellify bootcmd")
raise
try:
@@ -48,5 +49,6 @@ def handle(name, cfg, cloud, log, _args):
cmd = ['/bin/sh', tmpf.name]
util.subp(cmd, env=env, capture=False)
except:
- log.warn("Failed to run commands from bootcmd")
+ util.logexc(log,
+ ("Failed to run bootcmd transform %s"), name)
raise