Merge "Make haproxy proxy to the right glance_api backend"
This commit is contained in:
commit
d03b6daf77
@ -639,6 +639,7 @@ glance_backend_vmware: "no"
|
|||||||
glance_backend_swift: "{{ not (enable_ceph | bool) and enable_swift | bool }}"
|
glance_backend_swift: "{{ not (enable_ceph | bool) and enable_swift | bool }}"
|
||||||
glance_file_datadir_volume: "glance"
|
glance_file_datadir_volume: "glance"
|
||||||
glance_enable_rolling_upgrade: "no"
|
glance_enable_rolling_upgrade: "no"
|
||||||
|
glance_api_hosts: "{{ [groups['glance-api']|first] if glance_backend_file | bool and glance_file_datadir_volume == 'glance' else groups['glance-api'] }}"
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Barbican options
|
# Barbican options
|
||||||
|
@ -103,8 +103,6 @@ glance_backends:
|
|||||||
|
|
||||||
glance_store_backends: "{{ glance_backends|selectattr('enabled', 'equalto', true)|list }}"
|
glance_store_backends: "{{ glance_backends|selectattr('enabled', 'equalto', true)|list }}"
|
||||||
|
|
||||||
glance_api_hosts: "{{ groups['glance-api']|first if glance_backend_file | bool and glance_file_datadir_volume == 'glance' else groups['glance-api'] }}"
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# OpenStack
|
# OpenStack
|
||||||
####################
|
####################
|
||||||
|
@ -144,7 +144,7 @@ listen glance_api
|
|||||||
{% for http_option in haproxy_listen_http_extra %}
|
{% for http_option in haproxy_listen_http_extra %}
|
||||||
{{ http_option }}
|
{{ http_option }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for host in groups['glance-api'] %}
|
{% for host in glance_api_hosts %}
|
||||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
|
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if haproxy_enable_external_vip | bool %}
|
{% if haproxy_enable_external_vip | bool %}
|
||||||
@ -158,7 +158,7 @@ listen glance_api_external
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
http-request del-header X-Forwarded-Proto
|
http-request del-header X-Forwarded-Proto
|
||||||
http-request set-header X-Forwarded-Proto https if { ssl_fc }
|
http-request set-header X-Forwarded-Proto https if { ssl_fc }
|
||||||
{% for host in groups['glance-api'] %}
|
{% for host in glance_api_hosts %}
|
||||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
|
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ glance_api_port }} check inter 2000 rise 2 fall 5
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user