Reviewed: https://review.opendev.org/734658 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3b99747b42e460567d52cc6d748396cb349d56b8 Submitter: Zuul Branch: master
commit 3b99747b42e460567d52cc6d748396cb349d56b8 Author: Stephen Finucane <[email protected]> Date: Tue Jun 9 18:38:10 2020 +0100 libvirt: Don't allow "reserving" file-backed memory When file-backed memory is configured, it is the only "memory" reported by nova and used by instances, with RAM used in caching capacity. We should be warning users of this and insisting they explicitly configure the '[DEFAULT] reserved_host_memory_mb' config option to 0. However, doing so now would be breaking change. Instead, start logging a warning instead, failing only for the truly broken combination of reserving more file-backed memory than we have allocated. Change-Id: I9619338ad0f60253b628d96543f8ce3ac86242e3 Signed-off-by: Stephen Finucane <[email protected]> Closes-Bug: #1882821 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1882821 Title: '[libvirt] file_backed_memory' and '[DEFAULT] reserved_host_memory_mb' are incompatible Status in OpenStack Compute (nova): Fix Released Bug description: Per title, the '[libvirt] file_backed_memory' and '[DEFAULT] reserved_host_memory_mb' config options are incompatible. Not only does '[DEFAULT] reserved_host_memory_mb' not really make sense for file backed memory (if you want to reserve "memory", configure a lower '[libvirt] file_backed_memory' value) but configuring a value for '[libvirt] file_backed_memory' that is lower than the value for '[DEFAULT] reserved_host_memory_mb', which currently defaults to 512MB, will break nova's resource reporting to placement: nova.exception.ResourceProviderUpdateFailed: Failed to update resource provider via URL /resource_providers/f39bde61-6f73-4ccb-9488-6efb9689730f/inventories: {"errors": [{"status": 400, "title": "Bad Request", "detail": "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n Unable to update inventory for resource provider f39bde61-6f73-4ccb-9488-6efb9689730f: Invalid inventory for 'MEMORY_MB' on resource provider 'f39bde61-6f73-4ccb-9488-6efb9689730f'. The reserved value is greater than total. ", "code": "placement.undefined_code", "request_id": "req-977e43e7-1a7c-4309-96ec-49a75bdea58a"}]} Ideally we should error out if both values are configured, however, doing so would be a breaking change. Instead, we can warn if these are incompatible and then error our in a future release. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1882821/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

