hardware: Correct log

We currently get the following error message if attempting to fit a
guest with hugepages on a node that doesn't have enough:

  Host does not support requested memory pagesize, or not enough free
  pages of the requested size. Requested: -2 kB

Correct this, removing the kB suffix and adding a note on the meaning of
the negative values, like we have for the success path.

Change-Id: I247dc0ec03cd9e5a7b41f5c5534bdfb1af550029
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #2075959
This commit is contained in:
Stephen Finucane
2024-08-13 17:24:31 +01:00
parent 8c4a2e1b47
commit 4678bcbb06

View File

@@ -943,7 +943,9 @@ def _numa_fit_instance_cell(
if not pagesize:
LOG.debug('Host does not support requested memory pagesize, '
'or not enough free pages of the requested size. '
'Requested: %d kB', instance_cell.pagesize)
'Requested memory pagesize: %d '
'(small = -1, large = -2, any = -3)',
instance_cell.pagesize)
return None
LOG.debug('Selected memory pagesize: %(selected_mem_pagesize)d kB. '
'Requested memory pagesize: %(requested_mem_pagesize)d '