From 863515187575b9630c02f7318b94bd2ef9a6f4a9 Mon Sep 17 00:00:00 2001 From: Andreas Karis Date: Wed, 29 Nov 2017 20:55:17 -0500 Subject: [PATCH] Fixes 'Not enough available memory' log message Fixes a bug in log output about where 'Not enough available memory to schedule instance' printed full memory instead of available memory Change-Id: Id65e9f5eec9ba1f39bcba24539b11f2e27226941 Closes-Bug: #1735321 (cherry picked from commit 4fd51617fb408fa389baa1aed10db3a06cc1539b) --- nova/virt/hardware.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nova/virt/hardware.py b/nova/virt/hardware.py index 00fe8fbd3359..957577d11173 100644 --- a/nova/virt/hardware.py +++ b/nova/virt/hardware.py @@ -928,9 +928,11 @@ def _numa_fit_instance_cell_with_pinning(host_cell, instance_cell, if host_cell.avail_memory < instance_cell.memory: LOG.debug('Not enough available memory to schedule instance. ' 'Oversubscription is not possible with pinned instances. ' - 'Required: %(required)s, actual: %(actual)s', + 'Required: %(required)s, available: %(available)s, ' + 'total: %(total)s. ', {'required': instance_cell.memory, - 'actual': host_cell.memory}) + 'available': host_cell.avail_memory, + 'total': host_cell.memory}) return if host_cell.siblings: