osuosl / ganeti_webmgr

Ganeti Web Manager is a Django based web application that allows administrators and clients access to their ganeti clusters. It includes a permissions and quota system that allows administrators to grant access to both clusters and virtual machines. It also includes user groups for structuring access to organizations.
https://code.osuosl.org/projects/ganeti-webmgr
GNU General Public License v2.0
64 stars 32 forks source link

Unable to syncdb #82

Closed aaronbareford closed 9 years ago

aaronbareford commented 9 years ago

Following the documentation on this page, we were unable to initilise the database using the following commends. http://ganeti-webmgr.readthedocs.org/en/latest/getting_started/installing.html

django-admin.py syncdb --migrate

The following error is what we see - can you provide any assistance please?

(ganeti_webmgr)[root@localhost ganeti_webmgr]# django-admin.py syncdb --migrate Traceback (most recent call last): File "/opt/ganeti_webmgr/bin/django-admin.py", line 5, in <module> management.execute_from_command_line() File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line utility.execute() File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command klass = load_command_class(app_name, subcommand) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module> import django.template.loaders.app_directories File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 21, in <module> mod = import_module(app) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/haystack/__init__.py", line 154, in <module> handle_registrations() File "/opt/ganeti_webmgr/lib/python2.7/site-packages/haystack/__init__.py", line 151, in handle_registrations search_sites_conf = importlib.import_module(settings.HAYSTACK_SITECONF) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/ganeti_webmgr/search_sites.py", line 2, in <module> haystack.autodiscover() File "/opt/ganeti_webmgr/lib/python2.7/site-packages/haystack/__init__.py", line 121, in autodiscover importlib.import_module("%s.search_indexes" % app) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/ganeti_webmgr/ganeti_web/search_indexes.py", line 3, in <module> from ganeti_webmgr.virtualmachines.models import VirtualMachine File "/opt/ganeti_webmgr/lib/python2.7/site-packages/ganeti_webmgr/virtualmachines/models.py", line 5, in <module> from ganeti_webmgr.clusters.models import CachedClusterObject File "/opt/ganeti_webmgr/lib/python2.7/site-packages/ganeti_webmgr/clusters/models.py", line 297, in <module> class Cluster(CachedClusterObject): File "/opt/ganeti_webmgr/lib/python2.7/site-packages/ganeti_webmgr/clusters/models.py", line 309, in Cluster max_length=128, blank=True) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/django_fields/fields.py", line 50, in __init__ self.cipher = self.cipher_object.new(settings.SECRET_KEY[:32]) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/Crypto/Cipher/AES.py", line 95, in new return AESCipher(key, *args, **kwargs) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/Crypto/Cipher/AES.py", line 59, in __init__ blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs) File "/opt/ganeti_webmgr/lib/python2.7/site-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__ self._cipher = factory.new(key, *args, **kwargs) ValueError: Key cannot be the null string

aaronbareford commented 9 years ago

We found the issue described here: https://groups.google.com/forum/#!msg/ganeti-webmgr/KQ6GH6BHqZA/bAcB9bCuAQAJ

By settings the variables in the config.yml django installed correctly.