summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-08-26 23:02:58 -0700
committerJoshua Harlow <harlowja@gmail.com>2014-08-26 23:02:58 -0700
commitcc9e3af6c95b3263a49d4590d9dd176bdc570c99 (patch)
tree10795ffc95e191c361b39f7cd364f384f26ee406 /cloudinit
parent5fc46193d3e65d0eaaaa45bcf41c5b35b4e80df7 (diff)
downloadvyos-cloud-init-cc9e3af6c95b3263a49d4590d9dd176bdc570c99.tar.gz
vyos-cloud-init-cc9e3af6c95b3263a49d4590d9dd176bdc570c99.zip
Add logging around failure to read optional/mandatory paths
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/sources/helpers/openstack.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 361c9994..e5a38de0 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -213,8 +213,12 @@ class BaseReader(object):
found = False
try:
data = self._path_read(path)
- except IOError:
- pass
+ except IOError as e:
+ if not required:
+ LOG.debug("Failed reading optional path %s due"
+ " to: %s", path, e)
+ else:
+ LOG.exception("Failed reading mandatory path %s", path)
else:
found = True
if required and not found: