From ac84c966bdf6fb007b3c29f4cabb1f8fe5236579 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 9 Jul 2012 17:28:11 -0400 Subject: cloud-init: do not warn on failure to find local datasource Instead of a warning, only debug this message. Warnings get to console and look scary to users. --- bin/cloud-init | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bin/cloud-init') diff --git a/bin/cloud-init b/bin/cloud-init index 52a677e9..51360270 100755 --- a/bin/cloud-init +++ b/bin/cloud-init @@ -219,13 +219,15 @@ def main_init(name, args): try: init.fetch() except sources.DataSourceNotFoundException: - util.logexc(LOG, ("No instance datasource found!" - " Likely bad things to come!")) - # In the case of cloud-init (net mode) it is a bit - # more likely that the user would consider it - # failure if nothing was found. When using - # upstart it will also mentions job failure + # In the case of 'cloud-init init' without '--local' it is a bit + # more likely that the user would consider it failure if nothing was + # found. When using upstart it will also mentions job failure # in console log if exit code is != 0. + if args.local: + LOG.debug("No local datasource found") + else: + util.logexc(LOG, ("No instance datasource found!" + " Likely bad things to come!")) if not args.force: if args.local: return 0 -- cgit v1.2.3