login not possible if not service "volume" defined on keystone

Bug #1084137 reported by Christian Berendt
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Matthias Runge
Folsom
Fix Released
High
Matthias Runge

Bug Description

The login to Horizon is not possible if there is not service entry "volume" on Keystone. Because volume is an optional service in an openstack environment it should also be optional to have a service entry for volume on keystone.

ServiceCatalogException at /syspanel/
Invalid service catalog service: volume
Request Method: GET
Request URL: http://spwdfvml682a1300.wdf.sap.corp:1080/syspanel/
Django Version: 1.4.2
Exception Type: ServiceCatalogException
Exception Value:
Invalid service catalog service: volume
Exception Location: /usr/lib64/python2.6/site-packages/horizon/api/base.py in url_for, line 118
Python Executable: /usr/bin/python
Python Version: 2.6.8
Python Path:
['/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../..',
 '/usr/lib/python26.zip',
 '/usr/lib64/python2.6',
 '/usr/lib64/python2.6/plat-linux2',
 '/usr/lib64/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/local/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
 '/usr/share/openstack-dashboard/openstack_dashboard']
Server time: Wed, 28 Nov 2012 16:45:45 +0000

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Need to see the full stack trace on this one. Previously it was possible to run Horizon without a volume service... if that's changed it's a regression and should be fixed.

Changed in horizon:
status: New → Incomplete
Changed in horizon:
importance: Undecided → High
milestone: none → grizzly-2
Revision history for this message
Tihomir Trifonov (ttrifonov) wrote :

I've managed to hit this bug when trying to load Project > Modify quotas.

Although not related to login, as originally defined in the bug, it still can be confirmed.

Changed in horizon:
status: Incomplete → Confirmed
Revision history for this message
Tihomir Trifonov (ttrifonov) wrote :

The problem comes from dashboards/project/admin/views.py, which calls

            quota_data = quotas.get_tenant_quota_data(self.request)

But quotas.get_tenant_quota_data() is not intended to be called standalone.. It should be made private method, and called with something like:

    @memoized
    def tenant_quota_data(request):
        # Get our quotas and construct our usage object.
        disabled_quotas = []
        if not is_service_enabled(request, 'volume'):
            disabled_quotas.extend(['volumes', 'gigabytes'])

        return get_tenant_quota_data(request, disabled_quotas)

Also, the Project update form should take care when Volume is not enabled, and to hide the volume quotas from the form.

Revision history for this message
Tihomir Trifonov (ttrifonov) wrote :

Ops, we might talk about two bugs. The original stack trace says '/syspanel', which was renamed in Grizzly. Is this a Folsom Dashboard?

Revision history for this message
Matthias Runge (mrunge) wrote :

In current grizzly-1, I can reproduce the ServiceCatalogException with "Invalid service catalog service: volume"
on:
/project/images_and_snapshots/
/admin/info/

Revision history for this message
Matthias Runge (mrunge) wrote :

Tihomir,

sadly, I can not find your referred code piece. Currently, I made a small patch
https://review.openstack.org/#/c/17597/
to swallow calls to cinder, when url_for doesn't return a 'volume' service.

Changed in horizon:
assignee: nobody → Matthias Runge (mrunge)
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/17597
Committed: http://github.com/openstack/horizon/commit/24367e6cea56006c8284576d534dc8d78bd67215
Submitter: Jenkins
Branch: master

commit 24367e6cea56006c8284576d534dc8d78bd67215
Author: Matthias Runge <email address hidden>
Date: Mon Dec 10 13:49:38 2012 +0100

    Avoid cinder calls, when cinder is unavailable

    When a volume service is not available, then a cinder client can not
    be created. This patch skips the calls, so that dashboard doesn't
    break any more.

    Change-Id: Ic5d029302d10b453257b452ba78541febf8e4c96
    Fixes bug 1084137

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/18303

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/folsom)

Reviewed: https://review.openstack.org/18303
Committed: http://github.com/openstack/horizon/commit/476072d49a41cd8461aa302591f828627760b67e
Submitter: Jenkins
Branch: stable/folsom

commit 476072d49a41cd8461aa302591f828627760b67e
Author: Matthias Runge <email address hidden>
Date: Tue Dec 18 14:00:48 2012 +0100

    Avoid cinder calls, when cinder is unavailable

    When a volume service is not available, then a cinder client can not
    be created. This patch skips the calls, so that dashboard doesn't
    break any more.

    This is a backport to Folsom release, as this turned out to be a major
    issue.
    Fixes bug 1084137

    Change-Id: I8f2f8b0b131b4bb5319d74f6da48671f146d7e00

Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-2 → 2013.1
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.