Damien
Damien

Reputation: 21

Cloudfoundry grizzly keystone with devstack Install: configparser error in keystone.conf

I'm trying to install opnstack grizzly on a fresh ubuntu 12.04 server. The sript runs fin until it reach this point :

screen -S stack -p key -X stuff 'cd /opt/stack/keystone &&  
/opt/stack/keystone/bin/keystone-all --config-file /etc/keystone/keystone.con' --log-  
config  
/etc/keystone/logging.conf -d --debug || touch "/opt/stack/status/stack/key.failure"
2013-07-16 17:33:03 + echo 'Waiting for keystone to start...'
2013-07-16 17:33:03 Waiting for keystone to start...
2013-07-16 17:33:03 + timeout 60 sh -c 'while ! http_proxy= curl -s   
http://192.168.20.69:5000/v2.0/ >/dev/null; do sleep 1; done'
2013-07-16 17:34:03 + die 311 'keystone did not start'
2013-07-16 17:34:03 + local exitcode=0
2013-07-16 17:34:03 + set +o xtrace
2013-07-16 17:34:03 [ERROR] ./stack.sh:311 keystone did not start

the log file :

File "/opt/stack/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 669, in _interpolate
option, section, rawval, e.args[0])
ConfigParser.InterpolationMissingOptionError: Error in file /etc/keystone/keystone.conf:   
Bad value substitution:
    section: [DEFAULT]
    option : admin_endpoint
    key    : admin_port
    rawval : http://192.168.20.69:%(admin_port)s/

the parsing instruction :

https://github.com/openstack/keystone/blob/master/keystone/common/config.py

the ConfigParser.InterpolationMissingOptionError :

Exception raised when an option referenced from a value does not exist. Subclass of InterpolationError.

I actually don't understan which option referenced does not exist..

Thank you in advance for your help.

Damien

Upvotes: 2

Views: 3235

Answers (6)

user2802945
user2802945

Reputation: 179

I had the same problem when I ran stack.sh. The localrc file at the time of running stack.sh was:

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
# enable_service q-lbass
disable_service mysql
enable_service postgresql
# enable_service swift
# SWIFT_HASH=devstack
#
LOGFILE=$DEST/logs/stack.log
SCREEN_LOGDIR=$DEST/logs/screens
#
SERVICE_TOKEN=devstack
SCHEDULER=nova.scheduler.chance.ChanceScheduler

# Repositories
GLANCE_BRANCK=stable/grizzly
HORIZON_BRANCH=stable/grizzly
KEYSTONE_BRANCH=stable/grizzly
NOVA_BRANCH=stable/grizzly
NEUTRON_BRANCH=stable/grizzly
CINDER_BRANCH=stable/grizzly
SWIFT_BRANCH=stable/grizzly
PBR_BRANCH=master
REQUIREMENTS_BRANCH=stable/grizzly
CEILOMETER_BRANCH=stable/grizzly
...

However, after I removed the repositories definition, and let the defaults in stackrc take over, ie. all branches pointed to 'master', the problem went away.

Further, The contents of /opt/stack/keystone/bin/keystone-all script are different between the stable/grizzly and master branches. I think the one in 'master' branch seems to work now withe neutron enabled.

Upvotes: 1

Guest
Guest

Reputation: 1

Modify devstack/lib/keystone as follows:

iniset $KEYSTONE_CONF DEFAULT public_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:35357/"
iniset $KEYSTONE_CONF DEFAULT admin_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/"

Upvotes: 0

gusaki
gusaki

Reputation: 739

Looks like a bug that has been filed for keystone https://bugs.launchpad.net/keystone/+bug/1201861 and it is still open.

Upvotes: 0

user2596114
user2596114

Reputation: 11

just simply

visudo

add stack as user who will do same as root but no password required

stack ALL=(ALL:ALL) ALL

su stack

cp -r /root/devstack /home/stack/

cd /home/stack/devstack/

./stack.sh

clean all first if necessary

Upvotes: 0

user2596114
user2596114

Reputation: 11

this error because

  1. you run this "stack.sh" as root

or you forget to chmod your config in /etc/keystone/keystone.conf

  1. chmod 777 /etc/keystone/keystone.conf

unstack.sh and then re run stack.sh

Upvotes: 0

Geoff Arnold
Geoff Arnold

Reputation: 1

I just ran into this myself. The problem is that DevStack is building a Keystone configuration file in /etc/keystone/keystone.conf in which the option "admin_port" is used before it's been set. And you can't just edit keystone.conf and re-run stack.sh, because your edited version will be overwritten. I'm still chasing down the code that borks the configuration file....

Upvotes: -1

Related Questions