Bug 1625119

Summary: [rhos12] nova reporting incorrect available memory
Product: Red Hat OpenStack Reporter: Sahid Ferdjaoui <sferdjao>
Component: openstack-novaAssignee: Stephen Finucane <stephenfin>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: high Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: berrange, coldford, cswanson, dasmith, dvd, eglynn, jhakimra, kchamart, marjones, mbooth, mmethot, nova-maint, rosingh, sbauza, sgordon, srevivo, stephenfin, vromanso
Target Milestone: ---Keywords: Reopened, Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-nova-16.1.5-3.el7ost Doc Type: If docs needed, set a value
Doc Text:
Cause: When booting an instance with huge pages, nova did not consider the NUMA affinity of huge pages when determining if an instance could fit on the host. Consequence: An error would be raised when booting a instance on a host NUMA node with insufficient huge pages. Fix: Nova now considers NUMA affinity of host huge pages when booting instances with huge pages. Result: Hosts NUMA nodes that have sufficient CPUs but insufficient huge pages will now be rejected.
Story Points: ---
Clone Of: 1519540
: 1625120 (view as bug list) Environment:
Last Closed: 2018-12-05 18:50:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1569678, 1625120, 1625122    
Bug Blocks: 1519540    

Comment 15 Joe H. Rahme 2018-12-04 16:49:53 UTC
VERIFIED that nova now considers hugepage memory unavailable for instances booted on flavor without mem_page_size:


Verification steps:

1. Configure a high amount of huge pages on the compute node:

	[heat-admin@compute-1 ~]$ sudo echo 700 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages                                                                   
	700
	
	[heat-admin@compute-1 ~]$ grep -i HugePages /proc/meminfo 
	AnonHugePages:    212992 kB
	HugePages_Total:     700
	HugePages_Free:      700
	HugePages_Rsvd:        0
	HugePages_Surp:        0
	Hugepagesize:       2048 kB


2. Create a flavor that has more memory than total_memory - total_hugepage

	(overcloud) [stack@undercloud-0 ~]$ openstack flavor create --public m1.large --id auto --ram 2048 --disk 1 --vcpus 1
	
3. Boot an instance on this flavor. Instance fails with a "No valid
   host found" error.

Comment 17 errata-xmlrpc 2018-12-05 18:50:50 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/RHBA-2018:3791