Bug 1625122 - [rhos14] nova reporting incorrect available memory
Summary: [rhos14] nova reporting incorrect available memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: 14.0 (Rocky)
Assignee: OSP DFG:Compute
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On: 1569678
Blocks: 1519540 1625119 1625120 1664698
TreeView+ depends on / blocked
 
Reported: 2018-09-04 07:44 UTC by Sahid Ferdjaoui
Modified: 2023-03-21 18:59 UTC (History)
20 users (show)

Fixed In Version: openstack-nova-18.0.1-0.20180908065419.f5a5287.el7ost
Doc Type: Bug Fix
Doc Text:
With this update, Nova screens for the NUMA affinity of host huge pages when booting instances with huge pages. Nova rejects NUMA nodes with insufficient huge pages. Prior to this update, Nova did not screen for NUMA affinity of huge pages. If the host had insufficient NUMA pages, even with sufficient CPUs, the instance boot would fail.
Clone Of: 1625120
Environment:
Last Closed: 2019-01-11 11:51:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1734204 0 None None None 2018-09-04 07:44:07 UTC
OpenStack gerrit 532168 0 None MERGED hardware: fix memory check usage for small/large pages 2020-09-18 20:07:02 UTC
Red Hat Issue Tracker OSP-5104 0 None None None 2022-08-16 08:44:00 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:53:01 UTC

Comment 9 Joe H. Rahme 2019-01-09 18:28:22 UTC
Validated that the code works as intended but noted that this code
breaks oversubscription of memory for instances with a NUMA topology
but no hugepages: 

https://bugzilla.redhat.com/show_bug.cgi?id=1664698


verification steps
------------------

1. On the controller node of a fresh deployment:

    $ mysql -u nova -ss -r -e "select numa_topology from nova.compute_nodes where ID=2 ;" | python -m json.tool
    
    ...
                        "mempages": [
                            {
                                "nova_object.changes": [
                                    "total",
                                    "used",
                                    "reserved",
                                    "size_kb"
                                ],
                                "nova_object.data": {
                                    "reserved": 0,
                                    "size_kb": 4,
                                    "total": 8594000,
                                    "used": 0
                                },
                                "nova_object.name": "NUMAPagesTopology",
                                "nova_object.namespace": "nova",
                                "nova_object.version": "1.1"
                            },
    ...
    
2. launch a flavor

    $ openstack flavor create --id 1234 --vcpus 1 --ram 64 --disk 15 test-flavor
    $ openstack flavor set --property hw:numa_nodes=1 test-flavor
    $ openstack server create test-vm --flavor test-flavor --image test-rhel75

3. Comparing the value in the db


$ mysql -u nova -ss -r -e "select numa_topology from nova.compute_nodes where ID=2 ;" | python -m json.tool

    ...
                        "mempages": [
                            {
                                "nova_object.changes": [
                                    "total",
                                    "used",
                                    "reserved",
                                    "size_kb"
                                ],
                                "nova_object.data": {
                                    "reserved": 0,
                                    "size_kb": 4,
                                    "total": 8594000,
                                    "used": 16384
                                },
                                "nova_object.name": "NUMAPagesTopology",
                                "nova_object.namespace": "nova",
                                "nova_object.version": "1.1"
                            },
    ...


Running a full diff on the output of both requests we can check:

	$ diff before.log after.log                                                                                                                       
	...
	20c20
	<                     "cpu_usage": 0,
	---
	>                     "cpu_usage": 1,
	41c41
	<                     "memory_usage": 0,
	---
	>                     "memory_usage": 64,
	54c54
	<                                 "used": 0
	---
	>                                 "used": 16384
	62d61
	...

Comment 11 errata-xmlrpc 2019-01-11 11:51:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.