From 4678bcbb064da580500b1dbeddb0bdfdeac074ef Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 13 Aug 2024 17:24:31 +0100 Subject: [PATCH] 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 Closes-Bug: #2075959 --- nova/virt/hardware.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nova/virt/hardware.py b/nova/virt/hardware.py index 97f514631ef5..310d5fc0e5e3 100644 --- a/nova/virt/hardware.py +++ b/nova/virt/hardware.py @@ -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 '