Fix galera max connections calculation
The max connection calculation uses the number of vcpus reported by ansible however it's using the wrong value in one portion of the calculation. The result is that the calculation returns 0 rather than the intended 200 when there are both x86 and POWER controllers. Change-Id: I48314a3b701da4df6aaa0c163b14da36a1e70b7f Closes-Bug: #1647106
This commit is contained in:
parent
b4e128e184
commit
49a010176f
@ -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