No valid host was found. No valid host found for resize (HTTP 400) (Request-ID: req-71bf75ea-6dff-4176-a0a7-367ea2fe8337)
nova-scheduler
log, the following messages are seen:2024-06-04 12:54:01.923 10 WARNING nova.scheduler.utils [req-71bf75ea-6dff-4176-a0a7-367ea2fe8337 a81d8b0ccc1049948ac0de821678ac72 1bd2b05f4b9a466387da4482e5cf5285 - b164cfd9771542ebb4687f624c6ed32b b164cfd9771542ebb4687f624c6ed32b] Failed to compute_task_migrate_server: No valid host was found. There are not enough hosts available.
2024-06-04 12:54:00.632 14 DEBUG nova.scheduler.filters.availability_zone_filter [req-71bf75ea-6dff-4176-a0a7-367ea2fe8337 a81d8b0ccc1049948ac0de821678ac72 1bd2b05f4b9a466387da4482e5cf5285 - b164cfd9771542ebb4687f624c6ed32b b164cfd9771542ebb4687f624c6ed32b] Availability Zone 'ABC' requested. (compute01, domain-c73.57383ad3-e79a-40bc-9afe-ecc4d859c427) ram: 1285271MB disk: 2490368MB io_ops: 0 instances: 160 has AZs: {'AB'} host_passes /usr/lib/python3.7/site-packages/nova/scheduler/filters/availability_zone_filter.py
nova_api
database shows the availability zone ABC in the request_specs
table:MariaDB [nova_api]> SELECT id, instance_uuid, spec FROM request_specs WHERE instance_uuid = 'dd663d1f-5d8b-41a5-8171-cafa9dc954f7'\G;
*************************** 1. row ***************************
id: 38371
instance_uuid: dd663d1f-5d8b-41a5-8171-cafa9dc954f7
spec: { ..., "availability_zone": "ABC", ...}
This virtual server was previously running in availability zone 'ABC', but that zone was removed by the user, and the instance was migrated manually to zone 'AB'. When the instance "my-server" is resized, it tries to locate its old availability zone 'ABC', which no longer exists.
Update the Nova configuration to allow resizing on the same host. Set the parameter allow_resize_to_same_host
to true.
To apply the workaround, use the following configuration:
viocli update nova
conf:
nova:
DEFAULT:
allow_resize_to_same_host: true
vmware:
network_passthrough: false
tenant_vdc: false