since LOCAL_PATH is '/usr/share/openstack-dashboard/openstack_dashboard/local', it tries to write a file in that directory. This results in an error when running Horizon:
...
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 92,
in <module>
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store'))
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/python2.7/dist-packages/horizon/utils/secret_key.py", line 55, in generate_or_read_from_file
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] with lock:
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/python2.7/dist-packages/lockfile.py", line 223, in __enter__
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] self.acquire()
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/python2.7/dist-packages/lockfile.py", line 239, in acquire
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] raise LockFailed("failed to create %s" % self.unique_name)
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] LockFailed: failed to create /usr/share/openstack-dashboard/openstack_dashboard/local/xyz.MainThread-13731
Workaround is to set fixed SECRET_KEY as:
SECRET_KEY = 'randomchars'
or to define it in a different directory (for example, *unsecure* /tmp):
/etc/openstack- dashboard/ local_settings. py defines Horizon's SECRET_KEY as:
SECRET_KEY = secret_ key.generate_ or_read_ from_file( os.path. join(LOCAL_ PATH, '.secret_ key_store' ))
since LOCAL_PATH is '/usr/share/ openstack- dashboard/ openstack_ dashboard/ local', it tries to write a file in that directory. This results in an error when running Horizon:
... openstack- dashboard/ openstack_ dashboard/ wsgi/.. /../openstack_ dashboard/ local/local_ settings. py", line 92, key.generate_ or_read_ from_file( os.path. join(LOCAL_ PATH, '.secret_ key_store' )) python2. 7/dist- packages/ horizon/ utils/secret_ key.py" , line 55, in generate_ or_read_ from_file python2. 7/dist- packages/ lockfile. py", line 223, in __enter__ python2. 7/dist- packages/ lockfile. py", line 239, in acquire openstack- dashboard/ openstack_ dashboard/ local/xyz. MainThread- 13731
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/share/
in <module>
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] SECRET_KEY = secret_
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] with lock:
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] self.acquire()
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] File "/usr/lib/
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] raise LockFailed("failed to create %s" % self.unique_name)
[Fri Aug 23 12:24:34 2013] [error] [client 192.168.122.1] LockFailed: failed to create /usr/share/
Workaround is to set fixed SECRET_KEY as:
SECRET_KEY = 'randomchars'
or to define it in a different directory (for example, *unsecure* /tmp):
SECRET_KEY = secret_ key.generate_ or_read_ from_file( '/tmp/. secret_ key_store' )