Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install a cloud following the OpenStack's official document. When I try to install dashboard on the cloud controller: http://docs.openstack.org/diablo/openstack-compute/install/content/configure-dashboard.html I had error when trying to sync database:

$ /usr/share/openstack-dashboard/dashboard/manage.py syncdb

ERROR:root:No module named local.local_settings
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/dashboard/settings.py", line 117, in <module>
    from local.local_settings import *
ImportError: No module named local.local_settings
ERROR:root:No module named local.local_settings
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/dashboard/../dashboard/settings.py", line 117, in <module>
    from local.local_settings import *
ImportError: No module named local.local_settings
Traceback (most recent call last):
  File "./dashboard/manage.py", line 31, in <module>
    execute_manager(settings)
  File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/pymodules/python2.7/django/core/management/commands/syncdb.py", line 56, in handle_noargs
    cursor = connection.cursor()
  File "/usr/lib/pymodules/python2.7/django/db/backends/dummy/base.py", line 15, in complain
    raise ImproperlyConfigured("You haven't set the database ENGINE setting yet.")
django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.

My /usr/share/openstack-dashboard/local/local_settings.py is the same in the guide. I installed python-mysqldb, but I doesn't change.

Then I try to install Dashboard from git like in wiki: http://wiki.openstack.org/OpenStackDashboard But I had the same error.

I use VirtualBox to install 2 servers, each one runs Ubuntu server 11.10 amd64. Everything fine, except for Dashboard!

How can I fix it? Thank you!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It looks like python can't find local.local_settings.py, an this looks normal to me.

You are in:

/usr/share/openstack-dashboard/dashboard/

And your local_settings.py is in:

/usr/share/openstack-dashboard/local/local_settings.py

import local.local_settings.py is going to look for it in /usr/share/openstack-dashboard/dashboard/local/local_settings.py

In the git there is a small wrapper in openstack-dashboard that could help with this problem. Just create a new file in openstack-dashboard, call it manage.py, copy this code:

#!/usr/bin/env python
import os, sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

And now execute it.

What that code do is changing a global so that the default settings.py for django is now dashboard/settings.py (instead of ./settings.py), and call the default django manage.py.

This should solve the import error as now local/local_settings.py exists. Of course it could create another import problems, but it's worth trying.

share|improve this answer
    
No, in the git version (github.com/openstack/horizon/tree/master/openstack-dashboard) there is a manage.py in /usr/share/openstack-dashboard. I'll update the answer. –  Javier Rivera Feb 24 '12 at 9:32
    
Oh Thank you! I copied the local folder into the dashboard folder and run the command again and it's work. But I still can not connect to dashboard site. I will recheck my config file. –  neo0 Feb 24 '12 at 9:35
    
If it works, remember to accept the answer, we are having a cleanup of unanswered questions running just now and well... if feels awkward to add questions to it instead of removing. –  Javier Rivera Feb 24 '12 at 10:20
    
An extra note, it's likely wiser to use links than to copy folder in this case. –  Javier Rivera Feb 24 '12 at 10:21
    
Thank you! This is the first time I ask question in askubuntu.com. I'll be careful in next time. –  neo0 Feb 24 '12 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.