Merge "Fix host add by DHCP"

This commit is contained in:
Zuul 2024-05-15 02:30:50 +00:00 committed by Gerrit Code Review
commit 9fd2da6266
1 changed files with 6 additions and 2 deletions

View File

@ -1933,8 +1933,12 @@ class ConductorManager(service.PeriodicService):
sw_version = load.software_version
else:
# No load provided, look it up...
host = self.dbapi.ihost_get_by_hostname(host.hostname)
sw_version = host.sw_version
try:
host = self.dbapi.ihost_get_by_hostname(host.hostname)
sw_version = host.sw_version
except exception.NodeNotFound:
LOG.debug("Host %s couldn't be found." % host.hostname)
pass
if (host.personality == constants.CONTROLLER and
constants.WORKER in tsc.subfunctions):