Keystone cannot be started outside the tree

Bug #942791 reported by Kevin L. Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
New
Undecided
Unassigned

Bug Description

This is after installing Keystone with "sudo python setup.py install"

  klmitch@devhost-klmitch:~/devel/src/keystone$ keystone-all --config-file=/home/klmitch/keystone/keystone-all.conf
  Traceback (most recent call last):
    File "/usr/local/bin/keystone-all", line 5, in <module>
      pkg_resources.run_script('keystone==2012.1', 'keystone-all')
    File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script
      execfile(script_filename, namespace, namespace)
    File "/usr/local/lib/python2.6/dist-packages/keystone-2012.1-py2.6.egg/EGG-INFO/scripts/keystone-all", line 68, in <module>
      int(options['admin_port'])))
    File "/usr/local/lib/python2.6/dist-packages/keystone-2012.1-py2.6.egg/EGG-INFO/scripts/keystone-all", line 29, in create_server
      app = deploy.loadapp('config:%s' % conf, name=name)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
      return loadobj(APP, uri, name=name, **kw)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
      global_conf=global_conf)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
      global_conf=global_conf)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
      return loader.get_context(object_type, name, global_conf)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
      global_additions=global_additions)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 559, in _pipeline_app_context
      APP, pipeline[-1], global_conf)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
      section)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
      value = import_string(found_expr)
    File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
      return pkg_resources.EntryPoint.parse("x=" + s).load(False)
    File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1954, in load
      entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    File "/usr/local/lib/python2.6/dist-packages/keystone-2012.1-py2.6.egg/keystone/server.py", line 59, in <module>
      from keystone.common import config as common_config
    File "/usr/local/lib/python2.6/dist-packages/keystone-2012.1-py2.6.egg/keystone/common/config.py", line 23, in <module>
      import logging.config
  ImportError: No module named config

Note that:

  klmitch@devhost-klmitch:~/devel/src/keystone$ python
  Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
  [GCC 4.4.5] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import logging.config
  >>>

When run within the tree, i.e., as "./bin/keystone-all", it works fine.

Revision history for this message
Rafael Durán Castañeda (rafadurancastaneda) wrote :

I think this duplicates #942793, since it just ignores command lines options, but if you have configuration files on ~/.keystone/keystone.conf or /etc/keystone/keystone.conf it should work fine too. See find_config_files from keystone.openstack.common.cfg

https://github.com/openstack/keystone/blob/master/keystone/openstack/common/cfg.py#L308

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.