summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-19 21:19:43 -0400
committerScott Moser <smoser@ubuntu.com>2012-09-19 21:19:43 -0400
commit94b9647e4df742982cac8a2c2925fb4894281dbf (patch)
treea10d98b98272020401c06d8cbc4be9b0bd256f8e /bin
parent3912209cdb075b7af8f87c1e41170fd8614ca520 (diff)
parent5eef154928c75499c545c8c242bcf11d9ccf70d1 (diff)
downloadvyos-cloud-init-94b9647e4df742982cac8a2c2925fb4894281dbf.tar.gz
vyos-cloud-init-94b9647e4df742982cac8a2c2925fb4894281dbf.zip
if a logged message fails, fallback to logging to stdout
This most commonly occurs if a user-data script does '/sbin/poweroff' where syslog was being used. Once poweroff is invoked, syslog gets killed and logging would start to show stack traces. This generally tries to continue working instead, but log to stderr.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cloud-init3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index a6ad14a6..c5a5b949 100755
--- a/bin/cloud-init
+++ b/bin/cloud-init
@@ -33,6 +33,9 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
if os.path.exists(os.path.join(possible_topdir, "cloudinit", "__init__.py")):
sys.path.insert(0, possible_topdir)
+from cloudinit import patcher
+patcher.patch()
+
from cloudinit import log as logging
from cloudinit import netinfo
from cloudinit import signal_handler