Fix a race condition in logging when ubridge exit fast

Fix #1025
This commit is contained in:
Julien Duponchelle 2017-05-11 17:26:18 +02:00
parent fb6a95f7bb
commit f31e46e8ed
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -541,8 +541,9 @@ class BaseNode:
self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host) self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host)
log.info("Starting new uBridge hypervisor {}:{}".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port)) log.info("Starting new uBridge hypervisor {}:{}".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
yield from self._ubridge_hypervisor.start() yield from self._ubridge_hypervisor.start()
log.info("Hypervisor {}:{} has successfully started".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port)) if self._ubridge_hypervisor:
yield from self._ubridge_hypervisor.connect() log.info("Hypervisor {}:{} has successfully started".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
yield from self._ubridge_hypervisor.connect()
@asyncio.coroutine @asyncio.coroutine
def _stop_ubridge(self): def _stop_ubridge(self):