diff options
| author | Joshua Harlow <harlowja@gmail.com> | 2014-08-26 23:02:58 -0700 | 
|---|---|---|
| committer | Joshua Harlow <harlowja@gmail.com> | 2014-08-26 23:02:58 -0700 | 
| commit | cc9e3af6c95b3263a49d4590d9dd176bdc570c99 (patch) | |
| tree | 10795ffc95e191c361b39f7cd364f384f26ee406 /cloudinit/sources/helpers | |
| parent | 5fc46193d3e65d0eaaaa45bcf41c5b35b4e80df7 (diff) | |
| download | vyos-cloud-init-cc9e3af6c95b3263a49d4590d9dd176bdc570c99.tar.gz vyos-cloud-init-cc9e3af6c95b3263a49d4590d9dd176bdc570c99.zip | |
Add logging around failure to read optional/mandatory paths
Diffstat (limited to 'cloudinit/sources/helpers')
| -rw-r--r-- | cloudinit/sources/helpers/openstack.py | 8 | 
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: | 
