fail to apply manifests when management ip is missing

Commit to fix bug #1790159 causes retry handler to fail
because of mismatched function arguments. Remove 'self'
from retry handler and fix error message formatting.

Change-Id: Iedeb41451acd0f32b944b49d45f0c4b30a79ebc2
Closes-Bug: #1805678
This commit is contained in:
Daniel Badea 2019-01-23 15:12:17 +00:00
parent f03f914ecf
commit 6287c90d49
2 changed files with 5 additions and 4 deletions

View File

@ -1380,8 +1380,9 @@ class AgentManager(service.PeriodicService):
self._update_config_applied(iconfig_uuid)
self._report_config_applied(context)
def _retry_on_missing_mgmt_ip(self, exception):
return isinstance(exception, exception.LocalManagementIpNotFound)
def _retry_on_missing_mgmt_ip(ex):
LOG.info('Caught exception. Retrying... Exception: {}'.format(ex))
return isinstance(ex, exception.LocalManagementIpNotFound)
@retrying.retry(wait_fixed=15 * 1000, stop_max_delay=300 * 1000,
retry_on_exception=_retry_on_missing_mgmt_ip)

View File

@ -1287,8 +1287,8 @@ class InvalidHelmNamespace(Invalid):
class LocalManagementIpNotFound(NotFound):
message = _("Local management IP not found: "
"config_uuid=%(config_uuid), config_dict=%(config_dict), "
"host_personality=%(host_personality)")
"config_uuid=%(config_uuid)s, config_dict=%(config_dict)s, "
"host_personality=%(host_personality)s")
class InvalidHelmDockerImageSource(Invalid):