Reviewed: https://review.openstack.org/296110 Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=139f892fecf4ce645e3a7a6a7d1087a94f402f89 Submitter: Jenkins Branch: master
commit 139f892fecf4ce645e3a7a6a7d1087a94f402f89 Author: Colleen Murphy <[email protected]> Date: Tue Mar 22 16:10:06 2016 -0700 Fix keystone-manage config file path Without this patch, the keystone-manage command looks for a default keystone.conf relative to the installed executable. In a developer's case this is likely to be relative to <venv name>/bin/keystone-manage. If installed via distro packages this will be something like /usr/bin/keystone-manage. The keystone developer documentation instructs the developer to copy the sample config file into the etc/ directory of the keystone source directory[1], which is not necessarily related to where the keystone-manage executable is installed. This patch causes the keystone-manage command to search for etc/keystone.conf relative to the python source file, keystone/cmd/manage.py, which will always be in the same place relative to the keystone repo's etc/ directory. If installed via distro packages this will cause keystone-manage to search for the config in something like /usr/lib/python2.7/dist-packages, but since it falls back to searching the standard oslo.cfg directories, the behavior won't change. [1] http://docs.openstack.org/developer/keystone/developing.html#configuring-keystone Closes-bug: #1561099 Change-Id: Icf9caac030e62deb17ce5df3a82737b408591ac0 ** Changed in: keystone Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Identity (keystone). https://bugs.launchpad.net/bugs/1561099 Title: keystone-manage looks for default_config_files in the wrong place Status in OpenStack Identity (keystone): Fix Released Bug description: Summary: The keystone-manage command searches for a default keystone.conf relative to the installed executable [1]. The result is that it will look in <venv name>/../etc/keystone.conf. Failing to find it there, it will search the standard oslo.cfg directories: ~/.keystone/, ~/, /etc/keystone/, /etc/. I can't find documentation stating keystone.conf should live at <venv name>/../etc/keystone.conf. I can find documentation saying it should live in the etc/ directory of the keystone source directory[2], and I can find documentation saying it should live in one of the oslo.cfg directories[3]. If keystone-manage searched for keystone.conf relative to the python source file keystone/cmd/manage.py rather than the installed binary, the instructions at [2] would work correctly and [3] would still work as a fallback. Steps to reproduce: 1) Follow the "Developing with Keystone" instructions (http://docs.openstack.org/developer/keystone/developing.html), copying etc/keystone.conf.sample to etc/keystone.conf. 2) Change the database connection string in etc/keystone.conf to sqlite:///keystone2.db 3) Run a keystone-manage db_sync Expected result: A sqlite database is created in the current working directory called keystone2.db Actual result: A sqlite database is created in the current working directory called keystone.db. [1] http://git.openstack.org/cgit/openstack/keystone/tree/keystone/cmd/manage.py#n23 [2] http://docs.openstack.org/developer/keystone/developing.html#configuring-keystone [3] http://docs.openstack.org/developer/keystone/configuration.html#configuration-files To manage notifications about this bug go to: https://bugs.launchpad.net/keystone/+bug/1561099/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

