Skip to content

Commit dd66f40

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Improve logging at '_numa_cells_support_network_metadata'" into stable/2023.1
2 parents f8ea57f + 4327363 commit dd66f40

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

nova/virt/hardware.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,7 @@ def _numa_cells_support_network_metadata(
22582258
required_tunnel = network_metadata.tunneled
22592259

22602260
if required_physnets:
2261+
removed_physnets = False
22612262
# identify requested physnets that have an affinity to any of our
22622263
# chosen host NUMA cells
22632264
for host_cell in chosen_host_cells:
@@ -2268,6 +2269,12 @@ def _numa_cells_support_network_metadata(
22682269
# drop said physnet(s) from the list we're searching for
22692270
required_physnets -= required_physnets.intersection(
22702271
host_cell.network_metadata.physnets)
2272+
removed_physnets = True
2273+
2274+
if required_physnets and removed_physnets:
2275+
LOG.debug('Not all requested physnets have affinity to one '
2276+
'of the chosen host NUMA cells. Remaining physnets '
2277+
'are: %(physnets)s.', {'physnets': required_physnets})
22712278

22722279
# however, if we still require some level of NUMA affinity, we need
22732280
# to make sure one of the other NUMA cells isn't providing that; note
@@ -2279,8 +2286,15 @@ def _numa_cells_support_network_metadata(
22792286

22802287
# if one of these cells provides affinity for one or more physnets,
22812288
# we need to fail because we should be using that node and are not
2282-
if required_physnets.intersection(
2283-
host_cell.network_metadata.physnets):
2289+
required_physnets_outside = required_physnets.intersection(
2290+
host_cell.network_metadata.physnets)
2291+
2292+
if required_physnets_outside:
2293+
LOG.debug('One or more requested physnets require affinity to '
2294+
'a NUMA cell outside of the chosen host cells. This '
2295+
'host cell cannot satisfy network requests for '
2296+
'these physnets: %(physnets)s',
2297+
{'physnets': required_physnets_outside})
22842298
return False
22852299

22862300
if required_tunnel:
@@ -2293,6 +2307,9 @@ def _numa_cells_support_network_metadata(
22932307
if host_cell.network_metadata.tunneled:
22942308
return True
22952309

2310+
LOG.debug('Tunneled networks have no affinity to any of the chosen '
2311+
'host NUMA cells.')
2312+
22962313
# however, if we still require some level of NUMA affinity, we need to
22972314
# make sure one of the other NUMA cells isn't providing that; note
22982315
# that, as with physnets, NUMA affinity might not be defined for
@@ -2302,6 +2319,12 @@ def _numa_cells_support_network_metadata(
23022319
continue
23032320

23042321
if host_cell.network_metadata.tunneled:
2322+
LOG.debug('The host declares NUMA affinity for tunneled '
2323+
'networks. The current instance requests a '
2324+
'tunneled network but this host cell is out of '
2325+
'the set declared to be local to the tunnel '
2326+
'network endpoint. As such, this host cell cannot '
2327+
'support the requested tunneled network.')
23052328
return False
23062329

23072330
return True

0 commit comments

Comments
 (0)