Bug 1791132 - [RHOS 16][Hugepages] Instance creation fails when hw_mem_page_size is set in image
Summary: [RHOS 16][Hugepages] Instance creation fails when hw_mem_page_size is set in ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Artom Lifshitz
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-14 23:07 UTC by Archit Modi
Modified: 2023-03-21 19:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-16 20:43:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (8.09 KB, text/plain)
2020-01-14 23:07 UTC, Archit Modi
no flags Details
debug logs for instance (53.30 KB, text/plain)
2020-01-14 23:09 UTC, Archit Modi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 702981 0 None MERGED Clarify fitting hugepages log message 2020-12-12 20:36:18 UTC

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


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