A complaint about a missing conf file when creating superuser

Asked by Antti Laiti on 2012-05-16

I tried to install Lava Server and other components using this guide: http://lava.readthedocs.org/en/latest/index.html

Here’s what I’ve ran:

$ bzr branch lp:lava-server
$ cd lava-server
$ sudo ./setup.py develop
$ cd ..

And I ran the same thing with:

Now after that I tried to create superuser:

$ sudo lava-server manage createsuperuser
Traceback (most recent call last):
  File "/usr/local/bin/lava-server", line 9, in <module>
    load_entry_point('lava-server==0.12', 'console_scripts', 'lava-server')()
  File "/home/laiti/src/lava-server/lava_server/manage.py", line 126, in main
  File "/home/laiti/src/lava-tool/lava_tool/dispatcher.py", line 45, in run_with_dispatcher_class
    raise cls.run()
  File "/home/laiti/src/lava-tool/lava/tool/dispatcher.py", line 147, in run
    raise SystemExit(cls().dispatch(args))
  File "/home/laiti/src/lava-tool/lava/tool/dispatcher.py", line 137, in dispatch
    return command.invoke()
  File "/home/laiti/src/lava-server/lava_server/manage.py", line 112, in invoke
    settings = __import__(settings_module, fromlist=[''])
  File "/home/laiti/src/lava-server/lava_server/settings/debian.py", line 17, in <module>
    DATABASES = {'default': debian_settings.default_database}
  File "/usr/local/lib/python2.7/dist-packages/django_debian-0.10.2-py2.7.egg/django_debian/settings.py", line 159, in default_database
    return get_database(pathname)
  File "/usr/local/lib/python2.7/dist-packages/django_debian-0.10.2-py2.7.egg/django_debian/dbconfig.py", line 33, in get_database
    config = ConfigFile.load(pathname)
  File "/usr/local/lib/python2.7/dist-packages/django_debian-0.10.2-py2.7.egg/django_debian/config_file.py", line 41, in load
    for key, value in cls._parse(pathname):
  File "/usr/local/lib/python2.7/dist-packages/django_debian-0.10.2-py2.7.egg/django_debian/config_file.py", line 50, in _parse
    with open(pathname, "rt") as stream:
IOError: [Errno 2] No such file or directory: '/etc/lava-server/default_database.conf'

I found no documentation on that config file. Am i doing something wrong here?

Question information

English Edit question
LAVA Project Edit question
No assignee Edit question
Last query:
Last reply:
Zygmunt Krynicki (zyga) said : #1

In general you are doing this wrong. Don't try to deploy from source directly. We have some tools that help to setup a lava "instance" as we call it. Look at lp:lava-deployment-tool. There is a readme file that you can look at. I would also discourage you from building the "pybundle" yourself, instead download it from launchpad.net/lava-project (there are downloads on the side)

As for the actual error you're seeing. This is the legacy from our debian packaging. In that mode the configuration is expected to exist in /etc/lava-* and it used to be created by the particular package maintainer scripts.

Can you help with this problem?

Provide an answer of your own, or ask Antti Laiti for more information if necessary.

To post a message you must log in.