我最近开始使用 OpenStack。这就是问题所在:我正在为 OpenStack (DNSaaS) 设置 Designate,并且我已根据此处的说明进行了设置——https: //designate.readthedocs.org/en/latest/getting-started.html
使用“noauth”auth_strategy,API 和 Central 服务正常工作,但我正在寻找与 OpenStack Keystone 的集成,因此我在 designate.conf 文件中更改了一些内容:
#-----------------------
# API Service
#-----------------------
[service:api]
# Address to bind the API server
api_host = 0.0.0.0
# Port the bind the API server to
api_port = 9001
# Authentication strategy to use - can be either "noauth" or "keystone"
auth_strategy = keystone
&&
#-----------------------
# Keystone Middleware
#-----------------------
[keystone_authtoken]
auth_host = xxx.xxx.xxx.xxx <-- redacted
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = redacted
admin_password = redacted
&&
##############
## Network API
##############
[network_api:neutron]
endpoints = RegionOne|http://xxx.xxx.xxx.xxx:9696
endpoint_type = publicURL
timeout = 30
admin_username = redacted
admin_password = redacted
admin_tenant_name = service
auth_url = http://xxx.xxx.xxx.xxx:35357/v2.0
#insecure = False
auth_strategy = keystone
#ca_certificates_file = /etc/path/to/ca.pem
保存这些更改并启动指定 API 后,会出现以下错误并且服务未启动:
2015-02-23 11:44:09.534 27878 TRACE designate File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 667, in <module>
2015-02-23 11:44:09.534 27878 TRACE designate _AuthTokenPlugin.register_conf_options(CONF, _AUTHTOKEN_GROUP)
2015-02-23 11:44:09.534 27878 TRACE designate AttributeError: type object '_AuthTokenPlugin' has no attribute 'register_conf_options'
2015-02-23 11:44:09.534 27878 TRACE designate
显然 _AuthTokenPlugin 没有属性“register_conf_options”。仔细检查随 Designate(keystonemiddleware 插件)提供的 auth_token.py 文件。只提到了两个“register_conf_options”实例;调用它的第 667 行。
_AuthTokenPlugin.register_conf_options(CONF, _AUTHTOKEN_GROUP)
更早的第 335 行:
_AUTHTOKEN_GROUP = 'keystone_authtoken'
CONF = cfg.CONF
CONF.register_opts(_OPTS, group=_AUTHTOKEN_GROUP)
auth.register_conf_options(CONF, _AUTHTOKEN_GROUP)
问题出在哪里?我该怎么做呢?提前感谢您提供任何提示或解决方案。