Create volume from image displays incorrect AZs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
High
|
Ivan Kolodyazhny | ||
OpenStack Dashboard Charm |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Ocata |
Fix Released
|
Undecided
|
Unassigned | ||
Pike |
Fix Released
|
Undecided
|
Unassigned | ||
Queens |
Fix Released
|
Undecided
|
Unassigned | ||
horizon (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
Undecided
|
Unassigned | ||
Artful |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Horizon will fetch and show the correct Cinder availability zones during volume creation and volume creation from image.
[Test Case]
See original description.
[Regression Potential]
Very low as this patch is cherry-picked with no additional changes from the upstream stable/ocata branch.
[Original Description]
Running openstack-origin cloud:ocata-xenial on stable/17.08 charms, we have an environment with the following Nova availability zones:
west-java-1a
west-java-1b
west-java-1c
When going to the Images tab of the project in Horizon, and selecting the far-right drop-down menu for any image and selecting "Create Volume" we are presented with a dialog which includes an Availability Zone drop-down which lists the above three AZs, none of which have a cinder-api or cinder-volume host residing within. When trying to create a volume from an instance on this dashboard, we get the error:
Invalid input received: Availability zone 'west-java-1a' is invalid. (HTTP 400)
When using Launch Instance with Create New Image = Yes, from same Image on the Images tab, we still get the same AZ dropdowns, but the system initializes the new volume and attaches to a running instance in that AZ properly.
Also, when using the Volumes tab and pressing the Create New Volume button, we can create a volume from any image, and the Availability Zone in this dialog only shows the "nova" AZ.
To re-create, build openstack ocata-xenial with three computes, one in each of 3 new AZs, cinder-api, cinder-ceph, and a minimal ceph cluster, all with defaults and load image into glance either with glance-
You'll notice that you might have the following availability zones:
openstack availability zone list
+------
| Zone Name | Zone Status |
+------
| internal | available |
| west-java-1a | available |
| west-java-1b | available |
| west-java-1c | available |
| nova | available |
| nova | available |
| nova | available |
+------
This 404 error is coming from the cinder api and has nothing to do with glance/images. It's simply that cinder's availability zone is "nova" and the nova aggregate-based availability zones should not be used in a cinder availability zone pull-down on the Images tab Create Volume dialog.
jujumanage@
+------
| Field | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-10-
| description | None |
| encrypted | False |
| id | ca32eb14-
| migration_status | None |
| multiattach | False |
| name | foo |
| properties | |
| replication_status | None |
| size | 50 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| type | None |
| updated_at | None |
| user_id | b327544aba2a482
+------
jujumanage@
Invalid input received: Availability zone 'west-java-1a' is invalid. (HTTP 400) (Request-ID: req-2f7d7d00-
tags: | added: sts |
Changed in horizon: | |
status: | New → Confirmed |
tags: | added: cinder |
Changed in horizon: | |
assignee: | nobody → Ivan Kolodyazhny (e0ne) |
Changed in horizon: | |
milestone: | next → queens-2 |
tags: | added: ocata-backport-potential pike-backport-potential |
tags: | removed: pike-backport-potential |
tags: |
added: verification-done-zesty verification-ocata-done removed: verification-needed-zesty verification-ocata-needed |
I can confirm your findings. However, this is a upstream Horizon bug.
If you go to Volume -> Create Volume horizon will correctly show the list of Cinders availability zones, and as you have pointed out when doing the same from Images -> Create Volume it shows the Nova availability zones. This is inconsistent behavior in Horizon.
Nova and Cinder have separate name space for availability zones and they may or may not overlap.
An example of how this is useful:
In a OpenStack deployment with Ceph as block storage it would make sense to have a single storage availability zone that is to be used by instances in all Nova availability zones.
In conclusion, I agree with your findings, but will mark this as Invalid for the OpenStack Dashboard Charm. Please raise to Horizon.