Optionally make dynamic vendordata failures fatal.

Some operators would like instance starts to fail if we cannot
fetch dynamic vendordata. Add an option to do that.

Change-Id: I0c31465c5c52cd4c7e4bb229a4452bc4c8df0e88
This commit is contained in:
Michael Still
2017-01-04 11:55:26 +11:00
committed by Stephen Finucane
parent 1f53bfcc79
commit 5ca61e4534
4 changed files with 39 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
"""Render vendordata as stored fetched from REST microservices."""
import requests
import six
import sys
from keystoneauth1 import exceptions as ks_exceptions
from keystoneauth1 import loading as ks_loading
@@ -111,6 +113,9 @@ class DynamicVendorData(vendordata.VendorDataDriver):
'url': url,
'error': e},
instance=self.instance)
if CONF.api.vendordata_dynamic_failure_fatal:
six.reraise(type(e), e, sys.exc_info()[2])
return {}
def get(self):