keystone config file doesn't work if you specify admin_endpoint

Bug #1160573 reported by Sean Dague on 2013-03-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Medium
Dolph Mathews

Bug Description

If you uncomment the following 2 lines in /etc/keystone.conf:

# The port number which the public admin listens on
admin_port = 35357

# The base endpoint URLs for keystone that are advertised to clients
# (NOTE: this does NOT affect how keystone listens for connections)
# public_endpoint = http://localhost:%(public_port)d/
admin_endpoint = http://localhost:%(admin_port)d/

Then try to start keystone you'll get:

(keystone-all): 2013-03-26 16:14:52,754 DEBUG cfg log_opt_values ********************************************************************************
Traceback (most recent call last):
  File "/opt/stack/grizzly/keystone/bin/keystone-all", line 112, in <module>
    options = deploy.appconfig('config:%s' % paste_config)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 261, in appconfig
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 413, in get_context
    defaults = self.parser.defaults()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 68, in defaults
    defaults[key] = self.get('DEFAULT', key) or val
  File "/usr/lib/python2.7/ConfigParser.py", line 623, in get
    return self._interpolate(section, option, value, d)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 75, in _interpolate
    self, section, option, rawval, vars)
  File "/usr/lib/python2.7/ConfigParser.py", line 666, in _interpolate
    value = value % vars
TypeError: Error in file /etc/keystone/keystone.conf: %d format: a number is required, not str

It appears that config parser doesn't actually support %d in interpolation

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

Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
status: New → In Progress
Dolph Mathews (dolph) on 2013-03-27
Changed in keystone:
importance: Undecided → Medium
tags: added: grizzly-backport-potential

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

commit b94f62a67b90ba030c38b2770e3f96ba1b155c55
Author: Dolph Mathews <email address hidden>
Date: Tue Mar 26 17:34:03 2013 -0500

    Use string for port in default endpoints (bug 1160573)

    Change-Id: I940f331eee14e449333e5d0ba5d071836a496653

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-05-29
Changed in keystone:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-1 → 2013.2
Alan Pevec (apevec) on 2014-03-30
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers