This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2192836 - [RFE] Return current and requested AZ of VMs
Summary: [RFE] Return current and requested AZ of VMs
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: OSP DFG:Compute
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-03 08:56 UTC by Eric Nothen
Modified: 2023-05-03 16:35 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 16:35:53 UTC
Target Upstream Version:
Embargoed:
bgibizer: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-24712 0 None None None 2023-05-03 08:57:11 UTC
Red Hat Issue Tracker   OSPRH-190 0 None None None 2023-05-03 16:35:52 UTC

Description Eric Nothen 2023-05-03 08:56:24 UTC
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:
1. 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
~~~

2. 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
~~~

3. 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]> 
~~~

Comment 1 Eric Nothen 2023-05-03 14:37:43 UTC
Am I correct in assuming  that this request would require an API microversion update, and is therefore not something that could land in RHOSP 17?


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