2

我正在尝试在新的 ubuntu 12.04 服务器上安装 opnstack grizzly。sript 运行 fin 直到达到这一点:

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

日志文件:

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/

解析指令:

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

ConfigParser.InterpolationMissingOptionError :

当从值引用的选项不存在时引发异常。InterpolationError 的子类。

我实际上不明白引用的哪个选项不存在..

预先感谢您的帮助。

达米安

4

6 回答 6

1

我在运行 stack.sh 时遇到了同样的问题。运行 stack.sh 时的 localrc 文件是:

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
...

但是,在我删除存储库定义后,让 stackrc 中的默认值接管,即。所有分支都指向“主人”,问题就消失了。

此外,/opt/stack/keystone/bin/keystone-all 脚本的内容在 stable/grizzly 和 master 分支之间是不同的。我认为'master'分支中的一个似乎现在可以在启用中子的情况下工作。

于 2013-09-21T21:09:40.700 回答
0

看起来像一个已经为 keystone https://bugs.launchpad.net/keystone/+bug/1201861提交的错误,它仍然是开放的。

于 2013-07-18T18:02:54.763 回答
0

修改 devstack/lib/keystone 如下:

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/"
于 2013-07-26T19:17:03.313 回答
0

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

于 2013-07-18T15:00:48.580 回答
0

只是简单

视觉

将堆栈添加为与 root 相同但不需要密码的用户

堆栈全部=(全部:全部)全部

苏栈

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

cd /home/stack/devstack/

./stack.sh

如有必要,首先清洁所有

于 2013-07-18T15:33:04.537 回答
-1

我自己也遇到了这个。问题是 DevStack 正在 /etc/keystone/keystone.conf 中构建一个 Keystone 配置文件,其中在设置之前使用了选项“admin_port”。而且您不能只编辑 keystone.conf 并重新运行 stack.sh,因为您编辑的版本将被覆盖。我仍在追查破坏配置文件的代码....

于 2013-07-17T17:30:27.627 回答