summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-20 00:43:46 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-20 00:43:46 -0700
commit47fcd1c5eeeaa9f066adfe7556d9e608492cb965 (patch)
tree1e001e795beff4060998fa289a7155d73ed02db7
parent83361093da4fed2209d4aa790e584023a6e57e1d (diff)
downloadvyos-cloud-init-47fcd1c5eeeaa9f066adfe7556d9e608492cb965.tar.gz
vyos-cloud-init-47fcd1c5eeeaa9f066adfe7556d9e608492cb965.zip
Show log message that says ec2 route disabling is not enabled
-rw-r--r--cloudinit/transforms/disable_ec2_metadata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/transforms/disable_ec2_metadata.py b/cloudinit/transforms/disable_ec2_metadata.py
index 3c0dd57b..c7d26029 100644
--- a/cloudinit/transforms/disable_ec2_metadata.py
+++ b/cloudinit/transforms/disable_ec2_metadata.py
@@ -27,7 +27,10 @@ frequency = PER_ALWAYS
reject_cmd = ['route', 'add', '-host', '169.254.169.254', 'reject']
-def handle(_name, cfg, _cloud, _log, _args):
+def handle(name, cfg, _cloud, log, _args):
disabled = util.get_cfg_option_bool(cfg, "disable_ec2_metadata", False)
if disabled:
util.subp(reject_cmd)
+ else:
+ log.debug(("Skipping transform named %s,"
+ " disabling the ec2 route not enabled"), name)