Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1791132

Summary: [RHOS 16][Hugepages] Instance creation fails when hw_mem_page_size is set in image
Product: Red Hat OpenStack Reporter: Archit Modi <amodi>
Component: openstack-novaAssignee: Artom Lifshitz <alifshit>
Status: CLOSED NOTABUG QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16.0 (Train)CC: dasmith, eglynn, jhakimra, kchamart, pkopec, sbauza, sgordon, vromanso
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-16 20:43:45 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:
Attachments:
Description Flags
logs
none
debug logs for instance none

Description Archit Modi 2020-01-14 23:07:20 UTC
Description of problem: Instance creation fails with "No valid hosts found" error when using the image with hw_mem_page_size=small(|1024|1GB|large) defined. 

NOTE: Instance is created successfully when hw:mem_page_size is defined in the flavor


Version-Release number of selected component (if applicable):
openstack-nova-compute-20.0.2-0.20191230035951.27bfd0b.el8ost.noarch

How reproducible:
always

Setup: NUMATopologyFilter should be enabled, compute nodes should have NUMA, Hugepages should be enabled on each compute

Steps to Reproduce:
1. Create an image with hw_mem_page_size=small property
2. Create a flavor with 2 cpus make sure Compute host has at least 4 physical cpus
3. Create a vm with that image, fails with error

Actual results:
+--------------------------------------+-----------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+
| ID                                   | Name      | Status | Task State | Power State | Networks | Image Name | Image ID                             | Flavor Name | Flavor ID | Availability Zone | Host | Properties |
+--------------------------------------+-----------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+
| 740cdcc8-7ade-4b63-9cfc-dfe09cf8f8d4 | test-5719 | ERROR  | None       | NOSTATE     |          | rhel7.7    | 4a9d32ab-714b-4ccd-8937-5acd40ac246d |             |           |                   | None |            |
+--------------------------------------+-----------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+


Expected results:
VM created successfully

Additional info:
Controller log:
020-01-14 22:39:33.734 43 DEBUG nova.virt.hardware [req-b7c05471-f9f9-4b1a-9e17-0b8e0d9fda74 a73228cfc17c4767aff80a2a20b27dd7 96a6914ad7264c929cdc17f9ba662349 - default default] Host does not support requested memory pagesize. Requested: -1 kB _numa_fit_instance_cell /usr/lib/python3.6/site-packages/nova/virt/hardware.py:1063
2020-01-14 22:39:33.734 43 DEBUG nova.scheduler.filters.numa_topology_filter [req-b7c05471-f9f9-4b1a-9e17-0b8e0d9fda74 a73228cfc17c4767aff80a2a20b27dd7 96a6914ad7264c929cdc17f9ba662349 - default default] [instance: bbea4f21-4d14-4ee7-98e6-daa0c147d2e4] compute-1.redhat.local, compute-1.redhat.local fails NUMA topology requirements. The instance does not fit on this host. host_passes /usr/lib/python3.6/site-packages/nova/scheduler/filters/numa_topology_filter.py:110
2020-01-14 22:39:33.734 43 INFO nova.filters [req-b7c05471-f9f9-4b1a-9e17-0b8e0d9fda74 a73228cfc17c4767aff80a2a20b27dd7 96a6914ad7264c929cdc17f9ba662349 - default default] Filter NUMATopologyFilter returned 0 hosts

Comment 1 Archit Modi 2020-01-14 23:07:59 UTC
Created attachment 1652312 [details]
logs

Comment 2 Archit Modi 2020-01-14 23:09:48 UTC
Created attachment 1652313 [details]
debug logs for instance

Comment 3 Archit Modi 2020-01-14 23:10:37 UTC
Sorry this is the instance for which the logs are provided:

+--------------------------------------+------------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+
| ID                                   | Name       | Status | Task State | Power State | Networks | Image Name | Image ID                             | Flavor Name | Flavor ID | Availability Zone | Host | Properties |
+--------------------------------------+------------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+
| bbea4f21-4d14-4ee7-98e6-daa0c147d2e4 | test-20985 | ERROR  | None       | NOSTATE     |          | rhel7.7    | 0b0f367a-d41d-488d-b05e-ddeabcd36359 |             |           |                   | None |            |
+--------------------------------------+------------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+

Comment 5 Artom Lifshitz 2020-01-16 20:42:56 UTC
Talking to Archit on IRC, it turns out the problem was that the host simply didn't have enough free 4K pages to fit the instance. Changing the flavor's total RAM from 2GB to 256MB (there was a bit over 350MB free, the rest was pre-allocated 2MB pages) worked fine. I agree that the error message is misleading, so I proposed [1]. That being said, this is still NOTABUG.

[1] //review.opendev.org/702981