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
Created attachment 1652312 [details] logs
Created attachment 1652313 [details] debug logs for instance
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 | | +--------------------------------------+------------+--------+------------+-------------+----------+------------+--------------------------------------+-------------+-----------+-------------------+------+------------+
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