Merge "Adding improved logging to amphora rest driver"
This commit is contained in:
commit
78e28f880b
@ -31,7 +31,7 @@ from octavia.common.config import cfg
|
||||
from octavia.common import constants
|
||||
from octavia.common.jinja.haproxy import jinja_cfg
|
||||
from octavia.common.tls_utils import cert_parser
|
||||
from octavia.i18n import _LW
|
||||
from octavia.i18n import _LE, _LW
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
API_VERSION = constants.API_VERSION
|
||||
@ -244,9 +244,15 @@ class AmphoraAPIClient(object):
|
||||
LOG.warning(_LW("Could not connect to instance. Retrying."))
|
||||
time.sleep(CONF.haproxy_amphora.connection_retry_interval)
|
||||
if a == CONF.haproxy_amphora.connection_max_retries - 1:
|
||||
LOG.error(_LE("Timed out connecting to the amphora."))
|
||||
raise driver_except.TimeOutException()
|
||||
else:
|
||||
LOG.debug(
|
||||
"Connected to amphora. Response: {resp}".format(resp=r))
|
||||
return r
|
||||
LOG.error(_LE("Connection retries (currently set to %s) "
|
||||
"exhausted. The amphora is unavailable."),
|
||||
CONF.haproxy_amphora.connection_max_retries)
|
||||
raise driver_except.UnavailableException()
|
||||
|
||||
def upload_config(self, amp, listener_id, config):
|
||||
|
Loading…
Reference in New Issue
Block a user