keystone-all --config-dir is being ignored

Bug #1101129 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
gordon chung
Folsom
Fix Released
Undecided
Alan Pevec

Bug Description

After installing keystone and successfully running keystone-manage db_sync (using --config-dir param) I tried to start keystone-all using the --config-dir param as well but:

$ keystone-all --config-dir /opt/openstack/etc/keystone/
No config files could be found.
usage: keystone-all [-h] [--version] [--pydev-debug-port PYDEV_DEBUG_PORT]
                    [--verbose] [--noverbose] [--config-dir DIR]
                    [--log-config PATH] [--log-date-format DATE_FORMAT]
                    [--use-syslog] [--nouse-syslog] [--log-dir LOG_DIR]
                    [--syslog-log-facility SYSLOG_LOG_FACILITY]
                    [--standard-threads] [--nostandard-threads]
                    [--config-file PATH] [--pydev-debug-host PYDEV_DEBUG_HOST]
                    [--debug] [--nodebug] [--log-format FORMAT]
                    [--log-file PATH

[......]

$ ln -s /opt/openstack/etc/keystone ~/.keystone

$ keystone-all # Works

Changed in keystone:
status: New → Confirmed
Revision history for this message
Malini Bhandaru (malini-k-bhandaru) wrote :

The symbolic link works only becauseit places the config file in one of the default locations keystone looks for keystone.config.
By the way --config-file works.

Revision history for this message
Flavio Percoco (flaper87) wrote :

Yeap, I used the symlink just to show the configs where correct, I could have used --config-file as well.

Cheers

Revision history for this message
gordon chung (chungg) wrote :

from the looks of it, the config file is properly found and parsed using the '--config-dir' parameter. the issue is that the keystone-all script checks that CONF.config_file is set -- CONF.config_file is not set in the case where conf file is read via '--config-dir' parameter.

i think the fix needs to to be done in openstack.common code but i'm not sure what the protocol for modify code in there is (still new to openstack but i assume its shared code across projects based on its name).

Revision history for this message
Flavio Percoco (flaper87) wrote :

I haven't dug down this yet but if the fix has to be done in oslo, go ahead and clone that code, post the patch for review and then merge that code back to keystone as well once it's approved. There's a script that does that for you.

gordon chung (chungg)
Changed in keystone:
assignee: nobody → gordon chung (chungg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20505

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/20505
Committed: http://github.com/openstack/keystone/commit/a9d53dc93e962b99b3c20e77ea7863952de8e424
Submitter: Jenkins
Branch: master

commit a9d53dc93e962b99b3c20e77ea7863952de8e424
Author: Gordon Chung <email address hidden>
Date: Fri Jan 25 13:17:10 2013 -0500

    add check for config-dir parameter (bug1101129)

    Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/24249

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/folsom)

Reviewed: https://review.openstack.org/24249
Committed: http://github.com/openstack/keystone/commit/bb1ded04c18547f5cce399b59518cd68c84258fc
Submitter: Jenkins
Branch: stable/folsom

commit bb1ded04c18547f5cce399b59518cd68c84258fc
Author: Gordon Chung <email address hidden>
Date: Fri Jan 25 13:17:10 2013 -0500

    add check for config-dir parameter (bug1101129)

    Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147

Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-3 → 2013.1
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.