manila-ui crashes dashboard

Bug #1705087 reported by Antonio Abinader
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Invalid
Medium
Tom Barron

Bug Description

After manila-ui installation in OpenStack Ocata from the github manila-ui repo, the dashboard would result in a 500 http error.
Examination of apache2/error.log shows the following:

File "/usr/local/lib/python2.7/dist-packages/manila_ui/dashboards/project/shares/__init__.py", line 85, in <module>
quotas.QUOTA_FIELDS = quotas.QUOTA_FIELDS | MANILA_QUOTA_FIELDS
TypeError: unsupported operand type(s) for |: 'tuple' and 'set'

Revision history for this message
Antonio Abinader (abinade2) wrote :

As a fix I suggest changing the MANILA_QUOTA_FIELDS variable to a tuple
MANILA_QUOTA_FIELDS = {
    "shares",
    "share_gigabytes",
    "share_snapshots",
    "share_snapshot_gigabytes",
    "share_networks",
}

to

MANILA_QUOTA_FIELDS = (
    "shares",
    "share_gigabytes",
    "share_snapshots",
    "share_snapshot_gigabytes",
    "share_networks",
)

and changing the line:
quotas.QUOTA_FIELDS = quotas.QUOTA_FIELDS | MANILA_QUOTA_FIELDS

to:
quotas.QUOTA_FIELDS = quotas.QUOTA_FIELDS + MANILA_QUOTA_FIELDS

This solved the issue for me

Tom Barron (tpb)
Changed in manila:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Tom Barron (tpb)
Revision history for this message
Tom Barron (tpb) wrote :

Actually the stable/ocata branch upstream has this code as you suggest, with MANILA_QUOTA_FIELDS defined as a tuple. In stable/pike it was changed to a tuple:

commit fae241c1614de093636379fb306fa3242b45fe1a
Author: Valeriy Ponomaryov <email address hidden>
Date: Wed May 17 17:46:14 2017 +0300

    Fix compatibility with Horizon

    One of recent commits [1] to Horizon project broke compatibility
    with Manila UI project. So, update it.

    [1] I41cdabde477d87aa8b35d1c908e18a69454286c3

Your deployment apparently actually had stable/pike manila-ui code mixed with stable/ocata horizon code and you fixed it by effectively reverting the above commit.

Good detective work, and glad you got a fix, but I don't think there is anything for us to do upstream where we have appropriate manila-ui code on each of these branches for the corresponding base horizon package.

Changed in manila:
status: Triaged → Invalid
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.