[Pike support] Use volumev3 and cinderv3 in dashboard

Bug #1728761 reported by Seb-Solon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Ivan Kolodyazhny

Bug Description

Hi there,

Based on the release notes https://docs.openstack.org/releasenotes/nova/pike.html[1],

"Nova is now configured to use the v3 version of the Cinder API. You need to ensure that the v3 version of the Cinder API is available and listed in the service catalog in order to use Nova with the default configuration option."

By default Nova catalog_info parameter for cinder is volumev3:cinderv3:publicURL [https://docs.openstack.org/ocata/config-reference/compute/config-options.html]

From what I can see it is still not possible to have the dashboard working without a volumev2 service_type endpoint created. Having only volumev3:cinderv3 will result in Unauthorized error in the Dashboard (throw by django). Even if I update the OPENSTACK_API_VERSIONS dict in the dashboard config.

After some digging and playing: looks like the permission are not ready for such v3.

For instance this : https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/panel.py#L24 point to a volumev2, if I change that to v3 I managed to have the page served but with a bunch of error

Another piece of code that make me think volumev3 is not really supported : https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/cinder.py#L61 . Here we import some v2 client and it seems like it is tag as supported and/or prefered (preferred_version variable) for v2

Having v3 in the dashboard config will only need to the following error : https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/base.py#L96. Which is logic because of the if (2 line above) that prevent the use of not supported version (see previous paragraph)

I believe the fix would be to update the permissions, but I am not vary familiar with the code base so it may not be that easy.

My workaround for now is to register the volumev2 service even if the url points to 8776:/v3/ as [1] mentions "The base 3.0 version is identical to v2".

Hope this help to debug / fix the issue,

Regards,

Ivan Kolodyazhny (e0ne)
Changed in horizon:
assignee: nobody → Ivan Kolodyazhny (e0ne)
Ivan Kolodyazhny (e0ne)
Changed in horizon:
status: New → Confirmed
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/527767

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/527767
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a774fa30dd41c12eacad154adb40605025a165e2
Submitter: Zuul
Branch: master

commit a774fa30dd41c12eacad154adb40605025a165e2
Author: Ivan Kolodyazhny <email address hidden>
Date: Wed Dec 13 21:21:48 2017 +0200

    Use Cinder API v3 by default

    Cinder API v3 was introduced several releases ago and is backward
    compatible with API v2 so it's safe to swith to use it.

    Change-Id: I550e6c59bb14c17da78d7b2abcde5783b2b6825d
    Closes-Bug: #1728761

Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → queens-3
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b3

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

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.