diff options
author | Ben Howard <ben.howard@canonical.com> | 2012-08-22 16:35:11 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2012-08-22 16:35:11 -0600 |
commit | 6564861d44f843bb4e339db5691021ec7a95c511 (patch) | |
tree | d3f9f2fbc6e8e01bcab073f77b6f3d673a1da6be /cloudinit/config/cc_final_message.py | |
parent | a6752e739a0bb9052585b9b043ce1964bd77bb42 (diff) | |
parent | 56979d20b9c56c45bfbcaf93bc5f93fa505ece50 (diff) | |
download | vyos-cloud-init-6564861d44f843bb4e339db5691021ec7a95c511.tar.gz vyos-cloud-init-6564861d44f843bb4e339db5691021ec7a95c511.zip |
Merge with lp:cloud-init
Diffstat (limited to 'cloudinit/config/cc_final_message.py')
-rw-r--r-- | cloudinit/config/cc_final_message.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/config/cc_final_message.py b/cloudinit/config/cc_final_message.py index aff03c4e..6b864fda 100644 --- a/cloudinit/config/cc_final_message.py +++ b/cloudinit/config/cc_final_message.py @@ -28,7 +28,7 @@ frequency = PER_ALWAYS # Cheetah formated default message FINAL_MESSAGE_DEF = ("Cloud-init v. ${version} finished at ${timestamp}." - " Up ${uptime} seconds.") + " Datasource ${datasource}. Up ${uptime} seconds") def handle(_name, cfg, cloud, log, args): @@ -51,6 +51,7 @@ def handle(_name, cfg, cloud, log, args): 'uptime': uptime, 'timestamp': ts, 'version': cver, + 'datasource': str(cloud.datasource), } util.multi_log("%s\n" % (templater.render_string(msg_in, subs)), console=False, stderr=True) @@ -63,3 +64,6 @@ def handle(_name, cfg, cloud, log, args): util.write_file(boot_fin_fn, contents) except: util.logexc(log, "Failed to write boot finished file %s", boot_fin_fn) + + if cloud.datasource.is_disconnected: + log.warn("Used fallback datasource") |