Search code examples
pythonopenstackkeystone

OpenStack Designate: '_AuthTokenPlugin' has no attribute 'register_conf_options'


I have recently started to use OpenStack. Here's the problem: I am setting up Designate for OpenStack (DNSaaS) and I have set it up accordingly to the instructions here -- https://designate.readthedocs.org/en/latest/getting-started.html

With the "noauth" auth_strategy, the API and Central services are working correctly, but I was looking for integration with OpenStack Keystone, so I changed a few things in the designate.conf file:

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

After saving these changes and starting the Designate API the following error appears and the service is not started:

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 

Apparently _AuthTokenPlugin has no attribute 'register_conf_options'. Upon closer inspection of the auth_token.py file, which was supplied with Designate (keystonemiddleware plugin). There are only two instances of 'register_conf_options' being mentioned; this line 667 where it is called.

_AuthTokenPlugin.register_conf_options(CONF, _AUTHTOKEN_GROUP)

And earlier on line 335:

_AUTHTOKEN_GROUP = 'keystone_authtoken'
CONF = cfg.CONF
CONF.register_opts(_OPTS, group=_AUTHTOKEN_GROUP)
auth.register_conf_options(CONF, _AUTHTOKEN_GROUP) 

Where would the problem lie? And how would I go about it? Thank you in advance for any hints or solutions.


Solution

  • Unfortunately those docs are very out of date. :( They should work for the most part though. I just ran through them on a Trusty VM, and it seemed to work for me.

    The current docs are here - http://docs.openstack.org/developer/designate/

    It could be an incompatibility between the version of other OpenStack projects you have currently installed and the version of Designate you are trying to install.

    It looks like an issue with keystonemiddleware. We don't ship that as part of Designate, it is included as a requirement.

    The best place to start is to get the versions of OpenStack you have, followed by the output of pip freeze in the virtualenv.

    The is usually a few people in #openstack-dns on freenode as well, who can run through things in real time