Conductor waits for registration agent.

Instead of stopping, the conductor wait for a valid registration agent.

Change-Id: I356769f3af21ed183fd1d99c82d0cccc4dfaccb3
This commit is contained in:
Fabio Verboso 2020-03-02 17:55:54 +01:00
parent d407504102
commit e0ddecdeed
2 changed files with 6 additions and 1 deletions

View File

@ -80,6 +80,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()