Merge "Conductor waits for registration agent."

This commit is contained in:
Zuul 2020-03-03 09:35:03 +00:00 committed by Gerrit Code Review
commit bc736c3fdf
2 changed files with 6 additions and 1 deletions

View File

@ -86,6 +86,11 @@ class ConductorManager(object):
ragent = self.dbapi.get_registration_wampagent()
while not ragent:
LOG.warn("Cannot find a registration agent. Waiting for it...")
time.sleep(5)
ragent = self.dbapi.get_registration_wampagent()
LOG.info("Found registration agent: %s on %s",
ragent.hostname, ragent.wsurl)

View File

@ -585,7 +585,7 @@ class Connection(api.Connection):
.filter_by(ragent=True, online=True)
.one())
except NoResultFound:
raise exception.WampRegistrationAgentNotFound()
return None
def unregister_wampagent(self, hostname):
session = get_session()