Error rendering _project_list.html

Bug #1372334 reported by Colin Eby
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
David Lyle

Bug Description

On a fresh DevStack installation, I'm never able to login with either admin or demo account. The landing page breaks with the following message:
--------------------------------------------------
Error during template rendering
In template /opt/stack/horizon/openstack_dashboard/templates/context_selection/_project_list.html, error at line 7
Reverse for ''switch_tenants'' with arguments '(u'8e34c787db63456fb60cc303f94d40a6',)' and keyword arguments '{}' not found.
---------------------------------------------------

The page cites the error location content as : <a href="{% url 'switch_tenants' project.id %}?next={{ dashboard_url }}">

The error is generated from django's defaulttags.py in render, line 426. The django error is as follows:

----------------------------------------------------

NoReverseMatch at /project/

Reverse for ''switch_tenants'' with arguments '(u'8e34c787db63456fb60cc303f94d40a6',)' and keyword arguments '{}' not found.

Request Method: GET
Request URL: http://192.168.102.169/project/
Django Version: 1.4.13
Exception Type: NoReverseMatch
Exception Value:

Reverse for ''switch_tenants'' with arguments '(u'8e34c787db63456fb60cc303f94d40a6',)' and keyword arguments '{}' not found.

Exception Location: /usr/lib/python2.6/site-packages/django/template/defaulttags.py in render, line 426
Python Executable: /usr/bin/python

---------------------------------------------------------

Revision history for this message
Colin Eby (ceby2) wrote :
Revision history for this message
Hector (hector-lopez-w) wrote :
Download full text (4.9 KiB)

I have the same error after a fresh installation. I get:

2014-09-22 13:54:47.380 | ' /opt/devstack/local.conf
2014-09-22 13:54:47.386 | + [[ -x /opt/devstack/local.sh ]]
2014-09-22 13:54:47.386 | + service_check
2014-09-22 13:54:47.386 | + local service
2014-09-22 13:54:47.386 | + local failures
2014-09-22 13:54:47.386 | + SCREEN_NAME=stack
2014-09-22 13:54:47.386 | + SERVICE_DIR=/opt/stack/status
2014-09-22 13:54:47.386 | + [[ ! -d /opt/stack/status/stack ]]
2014-09-22 13:54:47.391 | ++ ls '/opt/stack/status/stack/*.failure'
2014-09-22 13:54:47.397 | ++ /bin/true
2014-09-22 13:54:47.405 | + failures=
2014-09-22 13:54:47.405 | + '[' -n '' ']'

Horizon is now available at http://192.168.3.20/
Keystone is serving at http://192.168.3.20:5000/v2.0/
Examples on using novaclient command line is in exercise.sh
The default users are: admin and demo
The password: root123
This is your host ip: 192.168.3.20

You are using Q_AGENT_EXTRA_AGENT_OPTS to pass configuration into /etc/neutron/neutron.conf.
Please convert that configuration in localrc to a /etc/neutron/neutron.conf section in local.conf:
Q_AGENT_EXTRA_AGENT_OPTS will be removed early in the 'K' development cycle

[[post-config|/$Q_PLUGIN_CONF_FILE]]
[DEFAULT]

tunnel_types=vxlan

And the Summary says:

2014-09-22 13:33:40.649 | stack.sh log /opt/stack/logs/stack.sh.log.2014-09-22-133340
2014-09-22 13:33:40.649 | Installing package prerequisites
2014-09-22 13:36:22.189 | Installing OpenStack project source
2014-09-22 13:42:46.487 | Installing Tempest
2014-09-22 13:42:52.897 | Starting rsyslog
2014-09-22 13:42:53.061 | Starting RabbitMQ
2014-09-22 13:42:55.129 | Configuring and starting MySQL
2014-09-22 13:42:56.512 | Enabling MySQL query logging
2014-09-22 13:43:04.050 | Starting Keystone
2014-09-22 13:47:52.041 | Configuring and starting Horizon
2014-09-22 13:48:10.208 | Configuring Glance
2014-09-22 13:48:14.246 | Configuring Neutron
2014-09-22 13:48:36.876 | Configuring Swift
2014-09-22 13:48:51.807 | Configuring Cinder
2014-09-22 13:48:56.620 | Configuring Nova
2014-09-22 13:49:20.498 | Starting Swift
2014-09-22 13:50:00.687 | Starting Glance
2014-09-22 13:50:10.762 | Uploading images
2014-09-22 13:50:34.074 | Starting Nova API
2014-09-22 13:50:41.272 | Starting Neutron
2014-09-22 13:51:00.288 | Creating initial neutron network elements
2014-09-22 13:51:25.614 | Starting Nova
2014-09-22 13:51:52.421 | Starting Cinder
2014-09-22 13:52:16.423 | Configuring Heat
2014-09-22 13:52:20.530 | Starting Heat
2014-09-22 13:54:17.119 | Initializing Tempest
2014-09-22 13:54:47.433 | WARNING: Q_AGENT_EXTRA_AGENT_OPTS is used
2014-09-22 13:54:47.433 | stack.sh completed in 1281 seconds.

But still have the same error message:

NoReverseMatch at /admin/
Reverse for ''switch_tenants'' with arguments '(u'01bea6d9e59b45b6aeccc58f4a4e862f',)' and keyword arguments '{}' not found.
Request Method: GET
Request URL: http://192.168.3.20/admin/
Django Version: 1.4.13
Exception Type: NoReverseMatch
Exception Value:
Reverse for ''switch_tenants'' with arguments '(u'01bea6d9e59b45b6aeccc58f4a4e862f',)' and keyword arguments '{}' not found.
Exception Location: /usr/lib/python2.6/site-packages/django/template/defaul...

Read more...

Revision history for this message
Colin Eby (ceby2) wrote :
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/123194

Changed in horizon:
assignee: nobody → David Lyle (david-lyle)
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Medium
milestone: none → juno-rc1
Revision history for this message
Colin Eby (ceby2) wrote :

Applied patch. Was able to login. Haven't tested extensively but am now able to proceed thanks.

Revision history for this message
Hector (hector-lopez-w) wrote :

Hello Colin,

Where is the fix or what are the steps to fix it?

I will appreciate if you can share me this information since I am getting frustrated.

Best regards,
Hector

Revision history for this message
Colin Eby (ceby2) wrote :

Apply the two files listed in the patch section of:
https://review.openstack.org/123194

-Colin

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

Reviewed: https://review.openstack.org/123194
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7a2c528f1783e087d9c21a3cf9a32a1c397af785
Submitter: Jenkins
Branch: master

commit 7a2c528f1783e087d9c21a3cf9a32a1c397af785
Author: David Lyle <email address hidden>
Date: Mon Sep 22 11:30:08 2014 -0600

    Fixing template compatibility

    New template files missing proper url import. Adding imports.

    Closes-Bug: #1372334
    Change-Id: I053996065ada3977432d3d46eb5e6724cae31e97

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
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.