summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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