From 99a1662f61867b2698c5a18743b421d930e0b046 Mon Sep 17 00:00:00 2001 From: Ken Wronkiewicz Date: Fri, 15 Jul 2016 17:14:24 -0700 Subject: [PATCH] Fix interface address for Neutron-server Note: This should not result in any behavior changes in regular Kolla, just Kolla-Kubernetes and only when you've overridden stuff in globals.yml Binds to the api_interface_address variable and uses the keystone and memcached facts we defined in earlier patches. Co-authored-by: Ryan Hallisey Change-Id: I8610f4adaa557a21fedd05601e10f5c308fd7ce3 Partially-implements: blueprint api-interface-bind-address-override --- ansible/roles/neutron/templates/neutron.conf.j2 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2 index 0fa7078f01..16f0b8b315 100644 --- a/ansible/roles/neutron/templates/neutron.conf.j2 +++ b/ansible/roles/neutron/templates/neutron.conf.j2 @@ -8,7 +8,7 @@ log_dir = /var/log/kolla/neutron # stderr and collected by Docker use_stderr = False -bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +bind_host = {{ api_interface_address }} bind_port = {{ neutron_server_port }} api_paste_config = /usr/share/neutron/api-paste.ini @@ -43,7 +43,7 @@ service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_d {% endif %} [nova] -auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} +auth_url = {{ keystone_admin_url }} auth_type = password project_domain_id = default user_domain_id = default @@ -70,8 +70,8 @@ connection = mysql+pymysql://{{ neutron_database_user }}:{{ neutron_database_pas max_retries = -1 [keystone_authtoken] -auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} -auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} +auth_uri = {{ keystone_public_url }} +auth_url = {{ keystone_admin_url }} auth_type = password project_domain_id = default user_domain_id = default @@ -81,8 +81,12 @@ password = {{ neutron_keystone_password }} memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcache_secret_key }} -memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} +{% if orchestration_engine == 'KUBERNETES' %} +memcache_servers = {{ memcached_servers }} +{% else %} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} +{% endif %} [oslo_messaging_notifications] {% if enable_ceilometer | bool %}