Merge "Fix the redis_connection_string for osprofiler and make it generic" into stable/stein
This commit is contained in:
commit
6187f49668
@ -681,7 +681,7 @@ enable_kibana: "{{ 'yes' if enable_central_logging | bool or enable_monasca | bo
|
||||
####################
|
||||
# Redis options
|
||||
####################
|
||||
redis_address: "{{ kolla_internal_fqdn }}"
|
||||
redis_connection_string: "redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}&socket_timeout=60&retry_on_timeout=yes"
|
||||
|
||||
####################
|
||||
# Osprofiler options
|
||||
@ -689,7 +689,6 @@ redis_address: "{{ kolla_internal_fqdn }}"
|
||||
# valid values: ["elasticsearch", "redis"]
|
||||
osprofiler_backend: "elasticsearch"
|
||||
elasticsearch_connection_string: "elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}"
|
||||
redis_connection_string: "redis://:{{ redis_master_password }}@{{ redis_address }}:{{ redis_port }}"
|
||||
osprofiler_backend_connection_string: "{{ redis_connection_string if osprofiler_backend == 'redis' else elasticsearch_connection_string }}"
|
||||
|
||||
####################
|
||||
|
@ -221,7 +221,7 @@ auth_endpoint = {{ keystone_internal_url }}
|
||||
|
||||
[coordination]
|
||||
{% if enable_redis | bool %}
|
||||
backend_url = redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}&socket_timeout=60&retry_on_timeout=yes
|
||||
backend_url = {{ redis_connection_string }}
|
||||
{% elif enable_etcd | bool %}
|
||||
# NOTE(jeffrey4l): python-etcd3 module do not support multi endpoint here.
|
||||
backend_url = etcd3://{{ hostvars[groups['etcd'][0]]['ansible_' + hostvars[groups['etcd'][0]]['api_interface']]['ipv4']['address'] }}:{{ etcd_client_port }}
|
||||
|
@ -4,7 +4,7 @@ debug = {{ gnocchi_logging_debug }}
|
||||
log_dir = /var/log/kolla/gnocchi
|
||||
|
||||
{% if enable_redis | bool %}
|
||||
coordination_url = redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}&socket_timeout=60&retry_on_timeout=yes
|
||||
coordination_url = {{ redis_connection_string }}
|
||||
{% endif %}
|
||||
|
||||
{% if service_name == 'gnocchi-api' %}
|
||||
@ -63,7 +63,7 @@ policy_file = {{ gnocchi_policy_file }}
|
||||
[incoming]
|
||||
{% if gnocchi_incoming_storage == 'redis' %}
|
||||
driver = redis
|
||||
redis_url = redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}&db=0&socket_timeout=60&retry_on_timeout=yes
|
||||
redis_url = {{ redis_connection_string }}
|
||||
{% endif %}
|
||||
|
||||
[storage]
|
||||
|
@ -76,4 +76,4 @@ connection_string = {{ osprofiler_backend_connection_string }}
|
||||
{% endif %}
|
||||
|
||||
[coordination]
|
||||
backend_url = redis://{% for host in groups['redis'] %}{% if host == groups['redis'][0] %}admin:{{ redis_master_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}?sentinel=kolla{% else %}&sentinel_fallback={{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ redis_sentinel_port }}{% endif %}{% endfor %}
|
||||
backend_url = {{ redis_connection_string }}
|
||||
|
Loading…
Reference in New Issue
Block a user