Devstack setup fails with error "The SECRET_KEY setting must not be empty"

asked 2013-06-07 10:24:45 -0600

JaydeepA gravatar image

updated 2013-06-07 17:02:40 -0600

smaffulli gravatar image


./ eventually fails with the following error I am using 12.4 LTS

ubuntu@ip-172-31-15-239:~/devstack$ tail -1 /etc/lsb-release

+ local_settings=/opt/stack/horizon/openstack_dashboard/local/
+ cp /home/ubuntu/devstack/files/ /opt/stack/horizon/openstack_dashboard/local/
+ cd /opt/stack/horizon
+ python syncdb --noinput
Traceback (most recent call last):
  File "", line 11, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 453, in execute_from_command_line
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 392, in execute
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 77, in load_command_class
    module = import_module('' % (app_name, name))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/", line 35, in import_module
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/", line 8, in <module>
    from import custom_sql_for_model, emit_post_sync_signal
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 9, in <module>
    from django.db import models
  File "/usr/local/lib/python2.7/dist-packages/django/db/", line 11, in <module>
    if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 53, in __getattr__
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 152, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
edit retag flag offensive close merge delete


Have you filled your localrc file with all the information it needs?

PerfectSine gravatar imagePerfectSine ( 2013-07-25 13:12:41 -0600 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-08-19 09:24:23 -0600

annegentle gravatar image

Looks like this can happen when django 1.4 is not pinned to be the version for Horizon. However it appears to be fixed, see .

edit flag offensive delete link more


The latest Horizon as available in devstack is compatible with Django 1.5, though.

jpichon gravatar imagejpichon ( 2013-08-20 05:11:10 -0600 )edit

answered 2013-08-20 05:13:06 -0600

jpichon gravatar image

Devstack should be creating a file based on, which has a SECRET_KEY set. Perhaps you can do it manually for now to work around the issue.

$ cp /opt/stack/horizon/openstack_dashboard/local/ /opt/stack/horizon/openstack_dashboard/local/
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-06-07 10:24:45 -0600

Seen: 3,799 times

Last updated: Aug 20 '13