Ask Your Question
1

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

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

JaydeepA gravatar image

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

smaffulli gravatar image

Hi,

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

ubuntu@ip-172-31-15-239:~/devstack$ tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

+ local_settings=/opt/stack/horizon/openstack_dashboard/local/local_settings.py
+ cp /home/ubuntu/devstack/files/horizon_settings.py /opt/stack/horizon/openstack_dashboard/local/local_settings.py
+ cd /opt/stack/horizon
+ python manage.py syncdb --noinput
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 77, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 8, in <module>
    from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 9, in <module>
    from django.db import models
  File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", 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/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 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

Comments

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

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

2 answers

Sort by ยป oldest newest most voted
1

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

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 https://bugs.launchpad.net/horizon/+bug/1133609 .

edit flag offensive delete link more

Comments

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

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

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

jpichon gravatar image

Devstack should be creating a local_settings.py file based on local_settings.py.example, 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/local_settings.py.example /opt/stack/horizon/openstack_dashboard/local/local_settings.py
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 3,652 times

Last updated: Aug 20 '13