-
Epic
-
Resolution: Unresolved
-
Undefined
-
None
-
None
Created from: https://bugzilla.redhat.com/show_bug.cgi?id=2192836
Description of problem:
As of today, server show and server list --long display the current AZ of a VM. That is, the AZ to which the host of the VM belongs. There is no way to tell from this information if the VM request included an AZ or not.
As a user, I would like to know if a VM was created using "--availability-zone", for example to understand which are the best target hosts when planning a VM migration.
Version-Release number of selected component (if applicable):
Any
How reproducible:
Always reproducible
Steps to Reproduce:
- Create AZs:
$ openstack aggregate create --zone External-AZ External-AZ $ openstack aggregate create --zone Internal-AZ Internal-AZ $ for x in 0 1 ; do openstack aggregate add host Internal-AZ overcloud-novacompute-${x}.keller.lab ;done $ for x in 2 3 4 ; do openstack aggregate add host External-AZ overcloud-novacompute-${x}.keller.lab ;done
- Create a server using --availability-zone and one without:
$ openstack server create --flavor 256m1c --image cirros-0.5.2 --network testnet --availability-zone Internal-AZ server-internalaz --wait >/dev/null $ openstack server create --flavor 256m1c --image cirros-0.5.2 --network testnet server-noaz --wait >/dev/null
- Display AZ for both hosts
Actual results:
$ openstack server list --long -c Name -c "Availability Zone" +-------------------+-------------------+ | Name | Availability Zone | +-------------------+-------------------+ | server-noaz | External-AZ | | server-internalaz | Internal-AZ | +-------------------+-------------------+
Expected results:
Server list and server show display both the current AZ and the AZ requested at build time.
Additional info:
Currently it's only possible to view this information querying the database:
[root@overcloud-controller-0 ~]# podman exec -ti $(podman ps -q -f name=galera) mysql nova Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 7994 Server version: 10.3.32-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [nova]> select nova.instances.display_name,nova.instances.availability_zone as current_az, -> trim(both '"' from json_extract(nova_api.request_specs.spec, '$."nova_object.data".availability_zone')) as creation_az -> from nova.instances inner join nova_api.request_specs on nova.instances.uuid = nova_api.request_specs.instance_uuid where nova.instances.deleted=0; +-------------------+-------------+-------------+ | display_name | current_az | creation_az | +-------------------+-------------+-------------+ | server-internalaz | Internal-AZ | Internal-AZ | | server-noaz | External-AZ | null | +-------------------+-------------+-------------+ 2 rows in set (0.001 sec) MariaDB [nova]>