Add a 'service' column to the openstack availability zone list output to avoid confusion

Bug #1762534 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Opinion
Undecided
Unassigned

Bug Description

The default 'nova' AZ shouldn't be requested by regular users when creating a server, and according to the compute API reference, it's not shown for non-admins:

https://developer.openstack.org/api-ref/compute/#id10

"You can list the available availability zones by calling the os-availability-zone API, but you should avoid using the default availability zone when booting the instance. In general, the default availability zone is named nova. This AZ is only shown when listing the availability zones as an admin."

However, the OSC CLI behavior is different than the nova CLI behavior in this respect:

stack@rocky:~$ source devstack/openrc demo
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
stack@rocky:~$ nova availability-zone-list
+------+-----------+
| Name | Status |
+------+-----------+
| az2 | available |
+------+-----------+
stack@rocky:~$ openstack availability zone list
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| az2 | available |
| nova | available |
| nova | available |
| nova | available |
+-----------+-------------+
stack@rocky:~$

That is for non-admin. If I'm an admin, I see this:

stack@rocky:~$ openstack aggregate list
+----+------+-------------------+
| ID | Name | Availability Zone |
+----+------+-------------------+
| 1 | az2 | az2 |
+----+------+-------------------+
stack@rocky:~$ nova availability-zone-list
+-----------------------+----------------------------------------+
| Name | Status |
+-----------------------+----------------------------------------+
| internal | available |
| |- rocky | |
| | |- nova-conductor | enabled :-) 2018-04-09T19:09:33.000000 |
| | |- nova-scheduler | enabled :-) 2018-04-09T19:09:30.000000 |
| | |- nova-consoleauth | enabled :-) 2018-04-09T19:09:32.000000 |
| az2 | available |
| |- rocky | |
| | |- nova-compute | enabled :-) 2018-04-09T19:09:25.000000 |
+-----------------------+----------------------------------------+
stack@rocky:~$ openstack availability zone list
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| internal | available |
| az2 | available |
| nova | available |
| nova | available |
| nova | available |
+-----------+-------------+
stack@rocky:~$

stack@rocky:~$ pip show python-openstackclient
Name: python-openstackclient
Version: 3.15.0

Revision history for this message
Matt Riedemann (mriedem) wrote :

This was from a devstack (rocky) created today:

stack@rocky:~/devstack$ git log -1
commit 935a89801b838ab71ece56b2e51cd79ab713625d
Merge: 22855eb a62ede7
Author: Zuul <email address hidden>
Date: Sun Apr 8 14:05:16 2018 +0000

    Merge "Use NOVA_BIN_DIR / SWIFT_BIN_DIR for binaries"
stack@rocky:~/devstack$

Revision history for this message
Matt Riedemann (mriedem) wrote :

Now that I've looked at the python-openstackclient CLI code, I see my mistake, it's showing AZs for the volume and network services too. I need to use the --compute option to filter to just nova.

stack@rocky:~/devstack$ openstack availability zone list --compute
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| az2 | available |
+-----------+-------------+

That could be more clear, like adding a 'Service' column or something to show the AZ is for a particular service.

Changed in python-openstackclient:
status: New → Opinion
summary: - openstack availability zone list shows default 'nova' AZ to non-admin
- users
+ Add a 'service' column to the openstack availability zone list output to
+ avoid confusion
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.