Availability zone is not shown when aggregate does not contain any host

Bug #2045888 reported by Vasyl Saienko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned

Bug Description

I'm using openstack yoga. The API responce for get availability zones is not consistent. When host aggregate with availability zone is present but does not contain any hosts the availability zone will not be shown at API.

heat@keystone-client-558fdf8468-7m9ml:/$ openstack aggregate list
+----+----------------------------------+----------------------------------+
| ID | Name | Availability Zone |
+----+----------------------------------+----------------------------------+
| 8 | test_nova_availability_zone_info | test_nova_availability_zone_info |
+----+----------------------------------+----------------------------------+
heat@keystone-client-558fdf8468-7m9ml:/$ openstack aggregate show test_nova_availability_zone_info
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| availability_zone | test_nova_availability_zone_info |
| created_at | 2023-12-07T08:59:51.000000 |
| deleted_at | None |
| hosts | |
| id | 8 |
| is_deleted | False |
| name | test_nova_availability_zone_info |
| properties | |
| updated_at | None |
| uuid | 889d7afb-c0d9-45b7-9d3a-4a26be354d76 |
+-------------------+--------------------------------------+
heat@keystone-client-558fdf8468-7m9ml:/$ openstack availability zone list
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| internal | available |
| nova | available |
| nova | available |
| nova | available |
| nova | available |
+-----------+-------------+

heat@keystone-client-558fdf8468-7m9ml:/$ openstack hypervisor list
+--------------------------------------+---------------------------------------------------------------------+-----------------+-------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+--------------------------------------+---------------------------------------------------------------------+-----------------+-------------+-------+
| 08a4272e-1be5-49aa-96dc-0a4ab0f599bf | vs-ps-cyyidx2qdgys-0-udpek27a2ej2-server-lz2lqfzble43.cluster.local | QEMU | 10.10.0.110 | up |
| bd70cb01-21fd-4c15-933e-44b2b617a69f | vs-ps-cyyidx2qdgys-1-zocrdztovdsf-server-xsspehh4ao5r.cluster.local | QEMU | 10.10.0.18 | up |
+--------------------------------------+---------------------------------------------------------------------+-----------------+-------------+-------+
heat@keystone-client-558fdf8468-7m9ml:/$ openstack aggregate add host test_nova_availability_zone_info vs-ps-cyyidx2qdgys-0-udpek27a2ej2-server-lz2lqfzble43
+-------------------+-------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------+
| availability_zone | test_nova_availability_zone_info |
| created_at | 2023-12-07T08:59:51.000000 |
| deleted_at | None |
| hosts | vs-ps-cyyidx2qdgys-0-udpek27a2ej2-server-lz2lqfzble43 |
| id | 8 |
| is_deleted | False |
| name | test_nova_availability_zone_info |
| properties | availability_zone='test_nova_availability_zone_info' |
| updated_at | None |
| uuid | None |
+-------------------+-------------------------------------------------------+
heat@keystone-client-558fdf8468-7m9ml:/$ openstack availability zone list
+----------------------------------+-------------+
| Zone Name | Zone Status |
+----------------------------------+-------------+
| internal | available |
| nova | available |
| test_nova_availability_zone_info | available |
| nova | available |
| nova | available |
| nova | available |
+----------------------------------+-------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/902875

Changed in nova:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.