diff options
author | Martin Packman <martin.packman@canonical.com> | 2012-03-08 17:56:36 +0000 |
---|---|---|
committer | Martin Packman <martin.packman@canonical.com> | 2012-03-08 17:56:36 +0000 |
commit | de316086b3915ddfc242a5cc25324f3181148a49 (patch) | |
tree | 9bbd3c418c4e3e2acf4ab87ee4cb4059ed01f5f6 /cloudinit/__init__.py | |
parent | 4877a389190f6598e13a0704e77d1c1586d25fb4 (diff) | |
download | vyos-cloud-init-de316086b3915ddfc242a5cc25324f3181148a49.tar.gz vyos-cloud-init-de316086b3915ddfc242a5cc25324f3181148a49.zip |
Put a warning in the log when userdata parts are not handled
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r-- | cloudinit/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index ccaa28c8..98a48fec 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -606,6 +606,12 @@ def partwalker_callback(pdata, ctype, filename, payload): partwalker_handle_handler(pdata, ctype, filename, payload) return if ctype not in pdata['handlers']: + start = payload.split("\n", 1)[0][:24] # Use first line or 24 bytes + if start < payload: + details = "starting '%s...'" % start.encode("string-escape") + else: + details = repr(payload) + log.warning("Unhandled userdata part of type %s %s", ctype, details) return handler_handle_part(pdata['handlers'][ctype], pdata['data'], ctype, filename, payload, pdata['frequency']) |