Create volume from image displays incorrect AZs

Bug #1721286 reported by Drew Freiberger
24
This bug affects 3 people
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-simplestreams-sync or other method. Click into Horizon's Images tab of admin project and click the drop-down of an image and select Create Volume. Fill out the form, you should only see the 3 new AZs but no nova AZ for creation of the volume, it should give the 404 error.

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@cmg01z00infr001:~/charms/cinder$ openstack volume create --availability-zone nova --size 50 foo
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2017-10-04T15:37:34.804855 |
| description | None |
| encrypted | False |
| id | ca32eb14-60f8-42c8-a5ef-d7687d25d606 |
| 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 | b327544aba2a482b9f12f1e6e615c394 |
+---------------------+--------------------------------------+
jujumanage@cmg01z00infr001:~/charms/cinder$ openstack volume create --availability-zone west-java-1a --size 50 foo
Invalid input received: Availability zone 'west-java-1a' is invalid. (HTTP 400) (Request-ID: req-2f7d7d00-f361-4772-9f71-66e4ebaefdc3)

Revision history for this message
Frode Nordahl (fnordahl) wrote :

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.

Changed in charm-openstack-dashboard:
status: New → Invalid
Frode Nordahl (fnordahl)
tags: added: sts
Revision history for this message
Frode Nordahl (fnordahl) wrote :

@Drew as courtesy I created a horizon task in this bug for you

Changed in horizon:
status: New → Confirmed
tags: added: cinder
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Marking as high since there is no workaround in Horizon. The offending code, which call nova's getAvailabilityZones api is at https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/static/app/core/images/steps/create-volume/create-volume.controller.js#n153

Changed in horizon:
importance: Undecided → High
milestone: none → next
summary: - Create Volume dialog on Instances tab displays incorrect AZs for cinder
+ Create volume from image displays incorrect AZs
Ivan Kolodyazhny (e0ne)
Changed in horizon:
assignee: nobody → Ivan Kolodyazhny (e0ne)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/513763

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/513763
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=b9972f73b008c48618909240665e80550e7fc3ed
Submitter: Zuul
Branch: master

commit b9972f73b008c48618909240665e80550e7fc3ed
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Oct 20 17:57:57 2017 +0300

    Fetch Cinder availability zones list for volume creation

    We have to fetch and show Cinder availability zones list during volume
    creation and volume creation from image.

    Change-Id: I1c8746870d94c183f5ef510c1ce09b3fc9c84220
    Closes-Bug: #1721286

Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: next → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/517303

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/517304

Frode Nordahl (fnordahl)
tags: added: ocata-backport-potential pike-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/pike)

Reviewed: https://review.openstack.org/517303
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=246ff9f81248a00a434e66d18fad70519ba811cc
Submitter: Zuul
Branch: stable/pike

commit 246ff9f81248a00a434e66d18fad70519ba811cc
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Oct 20 17:57:57 2017 +0300

    Fetch Cinder availability zones list for volume creation

    We have to fetch and show Cinder availability zones list during volume
    creation and volume creation from image.

    Change-Id: I1c8746870d94c183f5ef510c1ce09b3fc9c84220
    Closes-Bug: #1721286
    (cherry picked from commit b9972f73b008c48618909240665e80550e7fc3ed)

tags: added: in-stable-pike
Frode Nordahl (fnordahl)
tags: removed: pike-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.1

This issue was fixed in the openstack/horizon 12.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ocata)

Reviewed: https://review.openstack.org/517304
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d120b028e05939ba4a634504fb9dffee7e9af98d
Submitter: Zuul
Branch: stable/ocata

commit d120b028e05939ba4a634504fb9dffee7e9af98d
Author: Ivan Kolodyazhny <email address hidden>
Date: Fri Oct 20 17:57:57 2017 +0300

    Fetch Cinder availability zones list for volume creation

    We have to fetch and show Cinder availability zones list during volume
    creation and volume creation from image.

    Change-Id: I1c8746870d94c183f5ef510c1ce09b3fc9c84220
    Closes-Bug: #1721286
    (cherry picked from commit b9972f73b008c48618909240665e80550e7fc3ed)

tags: added: in-stable-ocata
Revision history for this message
Corey Bryant (corey.bryant) wrote :

For Ubuntu Artful (pike), this fix is included in the following stable point release: https://bugs.launchpad.net/cloud-archive/+bug/1734990

Changed in horizon (Ubuntu Bionic):
status: New → Fix Released
Changed in horizon (Ubuntu Artful):
status: New → Fix Committed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ubuntu SRU details:

[Impact]

Horizon will fetch and show the correct Cinder availability zones during volume creation and volume creation from image.

[Test Case]

See bug description above.

[Regression Potential]

Very low as this patch is cherry-picked with no additional changes from the upstream stable/ocata branch.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Drew, or anyone else affected,

Accepted horizon into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/3:11.0.4-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Changed in horizon (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed verification-needed-zesty
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Drew, or anyone else affected,

Accepted horizon into ocata-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:ocata-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-ocata-needed to verification-ocata-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-ocata-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-ocata-needed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b2

This issue was fixed in the openstack/horizon 13.0.0.0b2 development milestone.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Regression testing for artful/pike and zesty/ocata has passed successfully.

artful-pike-proposed with stable charms:

======
Totals
======
Ran: 102 tests in 1330.2917 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 635.2210 sec.

artful-pike-proposed with dev charms:

======
Totals
======
Ran: 102 tests in 1362.8431 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 644.0446 sec.

xenial-pike-proposed with stable charms:

======
Totals
======
Ran: 102 tests in 1808.0672 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 772.5066 sec.

xenial-pike-proposed with dev charms:

======
Totals
======
Ran: 102 tests in 1690.3705 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 767.2590 sec.

zesty-ocata-proposed with stable charms:

======
Totals
======
Ran: 102 tests in 1897.0150 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 1011.5607 sec.

zesty-ocata-proposed with dev charms:

======
Totals
======
Ran: 102 tests in 1933.5299 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 963.0546 sec.

xenial-ocata-proposed with stable charms:

======
Totals
======
Ran: 102 tests in 1767.3787 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 906.2188 sec.

xenial-ocata-proposed with dev charms:

======
Totals
======
Ran: 102 tests in 2051.1377 sec.
 - Passed: 93
 - Skipped: 9
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 998.9001 sec.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've also verified this particular bug is fixed by creating a volume from the images tab and it is successfully created in the selected volume AZ.

tags: added: verification-done-zesty verification-ocata-done
removed: verification-needed-zesty verification-ocata-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:11.0.4-0ubuntu1

---------------
horizon (3:11.0.4-0ubuntu1) zesty; urgency=medium

  * New stable point release for OpenStack Ocata (LP: #1736149).
  * d/p/fetch-cinder-availability-zones-list-for-volume-creation.patch:
    Cherry-pick patch from upstream stable/ocata branch to properly fetch and
    show Cinder AZs during volume creation (LP: #1721286).

 -- Corey Bryant <email address hidden> Mon, 04 Dec 2017 08:50:37 -0500

Changed in horizon (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:11.0.4-0ubuntu1~cloud0
---------------

 horizon (3:11.0.4-0ubuntu1~cloud0) xenial-ocata; urgency=medium
 .
   * New upstream release for the Ubuntu Cloud Archive.
 .
 horizon (3:11.0.4-0ubuntu1) zesty; urgency=medium
 .
   * New stable point release for OpenStack Ocata (LP: #1736149).
   * d/p/fetch-cinder-availability-zones-list-for-volume-creation.patch:
     Cherry-pick patch from upstream stable/ocata branch to properly fetch and
     show Cinder AZs during volume creation (LP: #1721286).

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've verified this bug is fixed in artful-proposed and pike-proposed by creating a volume from the images tab and it is successfully created in the selected volume AZ.

Changed in horizon (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon ocata-eol

This issue was fixed in the openstack/horizon ocata-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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