summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-07-09 17:28:11 -0400
committerScott Moser <smoser@ubuntu.com>2012-07-09 17:28:11 -0400
commitac84c966bdf6fb007b3c29f4cabb1f8fe5236579 (patch)
tree503ac4239eccd8c3ffd07fa6ac81e1da0709aaec /bin
parent48ec119bd68dfa090785db7758c542878ee5fc56 (diff)
downloadvyos-cloud-init-ac84c966bdf6fb007b3c29f4cabb1f8fe5236579.tar.gz
vyos-cloud-init-ac84c966bdf6fb007b3c29f4cabb1f8fe5236579.zip
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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cloud-init14
1 files changed, 8 insertions, 6 deletions
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