Merge "Fix galera max connections calculation"
This commit is contained in:
commit
48f74d8f3c
@ -1,6 +1,7 @@
|
||||
{%- set all_calculated_max_connections = [] %}
|
||||
{%- for galera_node in galera_cluster_members %}
|
||||
{%- if all_calculated_max_connections.append((hostvars[galera_node]['ansible_processor_vcpus'] | int > 0) | ternary (ansible_processor_vcpus, 2) * 100) %}
|
||||
{%- set vcpus = hostvars[galera_node]['ansible_processor_vcpus'] %}
|
||||
{%- if all_calculated_max_connections.append((vcpus | int > 0) | ternary (vcpus, 2) * 100) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- set calculated_max_connections = all_calculated_max_connections|sort %}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
{%- set all_calculated_max_connections = [] %}
|
||||
{%- for galera_node in galera_cluster_members %}
|
||||
{%- set _ = all_calculated_max_connections.append((hostvars[galera_node]['ansible_processor_vcpus'] | int > 0) | ternary (ansible_processor_vcpus, 2) * 100) %}
|
||||
{%- set vcpus = hostvars[galera_node]['ansible_processor_vcpus'] %}
|
||||
{%- set _ = all_calculated_max_connections.append((vcpus | int > 0) | ternary (vcpus, 2) * 100) %}
|
||||
{%- endfor %}
|
||||
{%- set calculated_min_connections = all_calculated_max_connections | min %}
|
||||
{%- set calculated_max_connections = galera_max_connections | default(calculated_min_connections) %}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
{%- set all_calculated_max_connections = [] %}
|
||||
{%- for galera_node in galera_cluster_members %}
|
||||
{%- set _ = all_calculated_max_connections.append((hostvars[galera_node]['ansible_processor_vcpus'] | int > 0) | ternary (ansible_processor_vcpus, 2) * 100) %}
|
||||
{%- set vcpus = hostvars[galera_node]['ansible_processor_vcpus'] %}
|
||||
{%- set _ = all_calculated_max_connections.append((vcpus | int > 0) | ternary (vcpus, 2) * 100) %}
|
||||
{%- endfor %}
|
||||
{%- set calculated_min_connections = all_calculated_max_connections | min %}
|
||||
{%- set calculated_max_connections = galera_max_connections | default(calculated_min_connections) %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user