diff --git a/rpc_deployment/roles/cinder_common/templates/cinder.conf b/rpc_deployment/roles/cinder_common/templates/cinder.conf index d8a913ce72..5fe8c38b0f 100644 --- a/rpc_deployment/roles/cinder_common/templates/cinder.conf +++ b/rpc_deployment/roles/cinder_common/templates/cinder.conf @@ -63,7 +63,8 @@ admin_tenant_name = {{ service_admin_tenant_name }} admin_user = {{ service_admin_username }} admin_password = {{ service_admin_password }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/glance_common/templates/glance-api.conf b/rpc_deployment/roles/glance_common/templates/glance-api.conf index 19cd85f8ab..f71f2fe689 100644 --- a/rpc_deployment/roles/glance_common/templates/glance-api.conf +++ b/rpc_deployment/roles/glance_common/templates/glance-api.conf @@ -63,7 +63,8 @@ admin_tenant_name = {{ service_admin_tenant_name }} admin_user = {{ service_admin_username }} admin_password = {{ service_admin_password }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/glance_common/templates/glance-registry.conf b/rpc_deployment/roles/glance_common/templates/glance-registry.conf index 5a2aed9fbe..5dad67eb65 100644 --- a/rpc_deployment/roles/glance_common/templates/glance-registry.conf +++ b/rpc_deployment/roles/glance_common/templates/glance-registry.conf @@ -18,7 +18,8 @@ admin_tenant_name = {{ service_admin_tenant_name }} admin_user = {{ service_admin_username }} admin_password = {{ service_admin_password }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/heat_common/templates/heat.conf b/rpc_deployment/roles/heat_common/templates/heat.conf index b54cfe7b76..39089c0ece 100644 --- a/rpc_deployment/roles/heat_common/templates/heat.conf +++ b/rpc_deployment/roles/heat_common/templates/heat.conf @@ -88,7 +88,8 @@ admin_tenant_name = {{ service_admin_tenant_name }} admin_user = {{ service_admin_username }} admin_password = {{ service_admin_password }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/horizon_common/templates/local_settings.py b/rpc_deployment/roles/horizon_common/templates/local_settings.py index 5ca174bbaf..27f8bc2261 100644 --- a/rpc_deployment/roles/horizon_common/templates/local_settings.py +++ b/rpc_deployment/roles/horizon_common/templates/local_settings.py @@ -103,7 +103,10 @@ SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/horizon/.secret_key CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': '{{ internal_vip_address }}:{{ memcached_port }}', + 'LOCATION': [ + {% for host in groups['memcached'] %}'{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}'{% if not loop.last %},{% endif %}{% endfor %} + + ] } } diff --git a/rpc_deployment/roles/keystone_common/templates/keystone.conf.j2 b/rpc_deployment/roles/keystone_common/templates/keystone.conf.j2 index 99a98bea12..39fcec7425 100644 --- a/rpc_deployment/roles/keystone_common/templates/keystone.conf.j2 +++ b/rpc_deployment/roles/keystone_common/templates/keystone.conf.j2 @@ -17,7 +17,8 @@ rabbit_password = {{ rabbit_password }} rpc_backend = {{ rpc_backend }} [memcache] -servers = {{ internal_vip_address }}:{{ memcached_port }} +servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + max_compare_and_set_retry = 16 [cache] @@ -102,4 +103,4 @@ revocation_cache_time = 3600 expiration = 43200 caching = true cache_time = 5400 -provider = {{ token_provider }} \ No newline at end of file +provider = {{ token_provider }} diff --git a/rpc_deployment/roles/neutron_common/templates/neutron.conf b/rpc_deployment/roles/neutron_common/templates/neutron.conf index 1a6ef79008..4c562c4e78 100644 --- a/rpc_deployment/roles/neutron_common/templates/neutron.conf +++ b/rpc_deployment/roles/neutron_common/templates/neutron.conf @@ -92,7 +92,8 @@ admin_tenant_name = {{ service_admin_tenant_name }} admin_user = {{ service_admin_username }} admin_password = {{ service_admin_password }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/nova_common/templates/nova.conf b/rpc_deployment/roles/nova_common/templates/nova.conf index 20d1458216..e527ed6ba1 100644 --- a/rpc_deployment/roles/nova_common/templates/nova.conf +++ b/rpc_deployment/roles/nova_common/templates/nova.conf @@ -87,7 +87,7 @@ force_config_drive = always max_age = {{ nova_max_age }} # Common -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} # Cinder [cinder] @@ -139,7 +139,8 @@ admin_password = {{ service_admin_password }} admin_user = {{ service_admin_username }} admin_tenant_name = {{ service_admin_tenant_name }} -memcached_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} + token_cache_time = 300 revocation_cache_time = 60 diff --git a/rpc_deployment/roles/swift_proxy/templates/proxy-server.conf.j2 b/rpc_deployment/roles/swift_proxy/templates/proxy-server.conf.j2 index 225a41730f..9822d6b75f 100644 --- a/rpc_deployment/roles/swift_proxy/templates/proxy-server.conf.j2 +++ b/rpc_deployment/roles/swift_proxy/templates/proxy-server.conf.j2 @@ -316,7 +316,7 @@ use = egg:swift#memcache # memcache.conf (see memcache.conf-sample) or lacking that file, it will # default to the value below. You can specify multiple servers separated with # commas, as in: 10.1.2.3:11211,10.1.2.4:11211 -memcache_servers = {{ internal_vip_address }}:{{ memcached_port }} +memcache_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['container_address'] }}:{{ memcached_port|default('11211') }}{% if not loop.last %},{% endif %}{% endfor %} # # Sets how memcache values are serialized and deserialized: # 0 = older, insecure pickle serialization diff --git a/rpc_deployment/vars/config_vars/haproxy_config.yml b/rpc_deployment/vars/config_vars/haproxy_config.yml index 22be6a92d5..6d399cb3c4 100644 --- a/rpc_deployment/vars/config_vars/haproxy_config.yml +++ b/rpc_deployment/vars/config_vars/haproxy_config.yml @@ -147,13 +147,6 @@ haproxy_config: hap_backend_alg: source hap_backend_options: - "ssl-hello-chk" - - service: - hap_service_name: memcached - hap_backend_nodes: "{{ [groups['memcached'][0]] }}" # list expected - hap_backup_nodes: "{{ groups['memcached'][1:] }}" - hap_port: 11211 - hap_balance_type: tcp - hap_whitelist_hosts: true - service: hap_service_name: elasticsearch hap_backend_nodes: "{{ [groups['elasticsearch'][0]] }}"