Fix designate config
The changes in [0] sadly were almost, but not quite, completely broken.
They introduced config options that do not exist in designate and also
made secrets being saved into the node config.
Fix all this, also clean up the remainder of a workaround that is no
longer needed.
This was partially fixed for stable/queens in [1], amended the
cherry-pick accordingly.
Conflicts:
recipes/common.rb
[0] If4e185eb58a525e22971c7a8b876274c353db847
[1] https://review.opendev.org/606094
Change-Id: I5ccb4fa5d8f3a003c4dd1b07e1c9ab2a99246dd6
(cherry picked from commit be2fd380fa
)
This commit is contained in:
parent
d128c82b68
commit
949c2e2038
|
@ -29,4 +29,4 @@ default['openstack']['dns']['conf']['keystone_authtoken']['username'] = 'designa
|
|||
default['openstack']['dns']['conf']['keystone_authtoken']['project_name'] = 'service'
|
||||
default['openstack']['dns']['conf']['keystone_authtoken']['project_domain_name'] = 'Default'
|
||||
default['openstack']['dns']['conf']['keystone_authtoken']['user_domain_name'] = 'Default'
|
||||
default['openstack']['dns']['conf']['keystone_authtoken']['keystone_authtoken.service_token_roles_required'] = 'True'
|
||||
default['openstack']['dns']['conf']['keystone_authtoken']['service_token_roles_required'] = 'True'
|
||||
|
|
|
@ -44,34 +44,20 @@ end
|
|||
|
||||
if node['openstack']['mq']['service_type'] == 'rabbit'
|
||||
node.default['openstack']['dns']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'dns'
|
||||
# Note(jh): Workaround for https://bugs.launchpad.net/designate/+bug/1673403
|
||||
# Stolen from rabbit_transport_url() in openstack-common/libraries/endpoints.rb
|
||||
mq_port = node['openstack']['endpoints']['mq']['port']
|
||||
url = ''
|
||||
if node['openstack']['mq']['cluster']
|
||||
node['openstack']['mq']['servers'].each do |server|
|
||||
url += "#{server}:#{mq_port}"
|
||||
url += ',' unless node['openstack']['mq']['servers'].last == server
|
||||
end
|
||||
else
|
||||
bind_mq_address = bind_address node['openstack']['bind_service']['mq']
|
||||
url += "#{bind_mq_address}:#{mq_port}"
|
||||
end
|
||||
end
|
||||
|
||||
db_user = node['openstack']['db']['dns']['username']
|
||||
db_pass = get_password 'db', 'designate'
|
||||
sql_connection = db_uri 'dns', db_user, db_pass
|
||||
|
||||
bind_services = node['openstack']['bind_service']['all']
|
||||
api_bind = bind_services['dns-api']
|
||||
api_bind_str = "#{bind_address api_bind}:#{api_bind['port']}"
|
||||
|
||||
identity_endpoint = internal_endpoint 'identity'
|
||||
|
||||
# define attributes that are needed in designate.conf
|
||||
node.default['openstack']['dns']['conf'].tap do |conf|
|
||||
conf['database']['connection'] = sql_connection
|
||||
conf['service:api']['listen'] = "#{bind_address api_bind}:#{api_bind['port']}"
|
||||
conf['service:api']['listen'] = api_bind_str
|
||||
conf['keystone_authtoken']['auth_url'] = identity_endpoint.to_s
|
||||
conf['keystone_authtoken']['www_authenticate_uri'] = identity_endpoint.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue