Fix a couple more cases of exceptional logs
This commit is contained in:
parent
34615906bb
commit
e3c6554420
@ -64,13 +64,13 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
max_wait = int(self.ds_cfg.get("max_wait", max_wait))
|
max_wait = int(self.ds_cfg.get("max_wait", max_wait))
|
||||||
except Exception:
|
except Exception as e:
|
||||||
util.logexc(LOG, "Failed to get max wait. using %s", max_wait)
|
LOG.debug("Failed to get max wait. using %s: %s", max_wait, e)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
timeout = max(0, int(self.ds_cfg.get("timeout", timeout)))
|
timeout = max(0, int(self.ds_cfg.get("timeout", timeout)))
|
||||||
except Exception:
|
except Exception as e:
|
||||||
util.logexc(LOG, "Failed to get timeout, using %s", timeout)
|
LOG.debug("Failed to get timeout, using %s: %s", timeout, e)
|
||||||
return (max_wait, timeout)
|
return (max_wait, timeout)
|
||||||
|
|
||||||
def wait_for_metadata_service(self):
|
def wait_for_metadata_service(self):
|
||||||
@ -82,7 +82,7 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
|
|||||||
if len(filtered):
|
if len(filtered):
|
||||||
urls = filtered
|
urls = filtered
|
||||||
else:
|
else:
|
||||||
LOG.warn("Empty metadata url list! using default list")
|
LOG.debug("Empty metadata url list! using default list")
|
||||||
urls = [DEF_MD_URL]
|
urls = [DEF_MD_URL]
|
||||||
|
|
||||||
md_urls = []
|
md_urls = []
|
||||||
@ -123,9 +123,9 @@ class DataSourceOpenStack(openstack.SourceMixin, sources.DataSource):
|
|||||||
'version': openstack.OS_HAVANA})
|
'version': openstack.OS_HAVANA})
|
||||||
except openstack.NonReadable:
|
except openstack.NonReadable:
|
||||||
return False
|
return False
|
||||||
except (openstack.BrokenMetadata, IOError):
|
except (openstack.BrokenMetadata, IOError) as e:
|
||||||
util.logexc(LOG, "Broken metadata address %s",
|
LOG.debug("Broken metadata address %s: %s",
|
||||||
self.metadata_address)
|
self.metadata_address, e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
user_dsmode = results.get('dsmode', None)
|
user_dsmode = results.get('dsmode', None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user