After upgrade cannot manage projects

Bug #1084119 reported by Edgardo Vega
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Expired
Undecided
Unassigned

Bug Description

After upgrade to Folsom I cannot manage project by the dashboard. I can on the cli.

My /var/log/httpd/error_log look like this

[Wed Nov 28 15:29:50 2012] [error] Problem instantiating action class.
[Wed Nov 28 15:29:50 2012] [error] Traceback (most recent call last):
[Wed Nov 28 15:29:50 2012] [error] File "/usr/lib/python2.6/site-packages/horizon/workflows/base.py", line 361, in action
[Wed Nov 28 15:29:50 2012] [error] context)
[Wed Nov 28 15:29:50 2012] [error] File "/usr/lib/python2.6/site-packages/horizon/dashboards/syspanel/projects/workflows.py", line 110, in __init__
[Wed Nov 28 15:29:50 2012] [error] redirect=reverse(INDEX_URL))
[Wed Nov 28 15:29:50 2012] [error] File "/usr/lib/python2.6/site-packages/horizon/dashboards/syspanel/projects/workflows.py", line 106, in __init__
[Wed Nov 28 15:29:50 2012] [error] default_role = api.get_default_role(self.request).id
[Wed Nov 28 15:29:50 2012] [error] AttributeError: 'NoneType' object has no attribute 'id'
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] mod_wsgi (pid=4574): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] Traceback (most recent call last):
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] response = self.get_response(request)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 179, in get_response
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return callback(request, **param_dict)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] response = view_func(request, *args, **kwargs)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/views/defaults.py", line 33, in server_error
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return http.HttpResponseServerError(t.render(Context({})))
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 140, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self._render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self.nodelist.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 823, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] bit = self.render_node(node, context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 837, in render_node
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return node.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 123, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return compiled_parent._render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self.nodelist.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 823, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] bit = self.render_node(node, context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 837, in render_node
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return node.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 155, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self.render_template(self.template, context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 137, in render_template
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] output = template.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 140, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self._render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self.nodelist.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 823, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] bit = self.render_node(node, context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/django/template/base.py", line 837, in render_node
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return node.render(context)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/compressor/templatetags/compress.py", line 147, in render
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] return self.render_compressed(context, self.kind, self.mode, forced=forced)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/compressor/templatetags/compress.py", line 88, in render_compressed
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] cached_offline = self.render_offline(context, forced=forced)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] File "/usr/lib/python2.6/site-packages/compressor/templatetags/compress.py", line 72, in render_offline
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] 'You may need to run "python manage.py compress".' % key)
[Wed Nov 28 15:29:50 2012] [error] [client 10.10.30.56] OfflineGenerationError: You have offline compression enabled but key "1056718f92f8d4204721bac759b3871a" is missing from offline manifest. You may need to run "python manage.py compress".

I did ran manage.py compress and it did not fix the problem.

Revision history for this message
Edgardo Vega (edgardo-vega) wrote :
Download full text (3.7 KiB)

I spent a last day trying to figure this out. I re-installed a few times without it working, but I did fix it. Here is the local_settings files that worked for me. I think the biggest issue I had was

OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"

which I changed to after running keystone role-list

OPENSTACK_KEYSTONE_DEFAULT_ROLE = "memberRole"

I am not sure how I fixed the other issue I was having about the offline manifest.

import os

DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROD = False
USE_SSL = False

# Note: You should change this value
SECRET_KEY = 'REMOVED'

LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(LOCAL_PATH, 'dashboard_openstack.sqlite3'),
# },
#}

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'dash',
        'USER': 'dash',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'default-character-set': 'utf8'
    },
}

# We recommend you use memcached for development; otherwise after every reload
# of the django development server, you will have to login again. To use
# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'

SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'

# Send email to the console by default
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Or send them to /dev/null
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'

# django-mailer uses a different settings attribute
MAILER_EMAIL_BACKEND = EMAIL_BACKEND

# Configure these for your outgoing email host
# EMAIL_HOST = 'smtp.my-company.com'
# EMAIL_PORT = 25
# EMAIL_HOST_USER = 'djangomail'
# EMAIL_HOST_PASSWORD = 'top-secret!'

OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/"
# FIXME: this is only needed until keystone fixes its GET /tenants call
# so that it doesn't return everything for admins
#OPENSTACK_KEYSTONE_ADMIN_URL = "http://localhost:35357/v2.0"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "memberRole"

# NOTE(tres): Available services should come from the service
# catalog in Keystone.
SWIFT_ENABLED = False

# Configure quantum connection details for networking
QUANTUM_ENABLED = False
#QUANTUM_URL = '127.0.0.1'
#QUANTUM_PORT = '9696'
#QUANTUM_TENANT = '1234'
#QUANTUM_CLIENT_VERSION='0.1'

# If you have external monitoring links
#EXTERNAL_MONITORING = [
# ['Nagios','http://foo.com'],
# ['Ganglia','http://bar.com'],
#]

# If you do not have external monitoring links
# EXTERNAL_MONITORING = []

# Uncomment the following segment to silence most logging
# django.db and boto DEBUG logging is extremely verbose.
#LOGGING = {
# 'version': 1,
# # set to True will disable all logging except that specified, unless
# # nothing is specified except that django.db.backends will still log,
# # even when set to True, so disable explicitly
# 'disable_existing_loggers': False,
# 'handlers': {
# 'null': {
# 'level': 'DEBUG',
# 'class': 'django.utils.log.NullHandler',
# ...

Read more...

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

It sounds like you got it running. The "default role" issue has come up in other tickets, and unfortunately depends on your installation so it's hard to guess. We use the default from devstack in the example conf file.

As for the compress error, that's strange. I would be curious to know how you installed Horizon (from what source, following which guide if any), as well as what OS you're running on, etc.

Changed in horizon:
status: New → Incomplete
Revision history for this message
Edgardo Vega (edgardo-vega) wrote :

Gabriel,

I install openstack on CentOs 6.3 first using the Essex packages on EPEL. I went though the installation guide manually (http://docs.openstack.org/essex/openstack-compute/install/yum/content/). After a few weeks then EPEL upgraded Folsom and when I ran yum update i was moved to Folsom. The install guide (http://docs.openstack.org/essex/openstack-compute/install/yum/content/setting-up-tenants-users-and-roles.html) specifically says "Create the default roles, admin and memberRole."

Let me know if you need additional information.

Revision history for this message
Julie Pichon (jpichon) wrote :

The compress issue is a common problem with RHEL/CentOS/Fedora installations, from my understanding because the compression needs to be done offline due to the lack of a nodejs package. Unfortunately those compression errors tend to hide real errors or make them difficult to find.

I filed https://bugs.launchpad.net/openstack-manuals/+bug/1101340 about the Member/memberRole issue in our documentation, hopefully we can update the installation instructions so Horizon can work well out of the box.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Dashboard (Horizon) because there has been no activity for 60 days.]

Changed in horizon:
status: Incomplete → Expired
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.