Merge "Set the proper amount of open files in systemd"
This commit is contained in:
commit
4d8b80395b
releasenotes/notes
templates
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Systems using systemd (like Ubuntu Xenial) were
|
||||||
|
incorrectly limited to a low amount of open files.
|
||||||
|
This was causing issues when restarting galera.
|
||||||
|
A deployer can still define the maximum number
|
||||||
|
of open files with the variable
|
||||||
|
``galera_file_limits`` (Defaults to 65536).
|
@ -1,13 +1,5 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{%- set all_calculated_max_connections = [] %}
|
|
||||||
{%- for galera_node in galera_cluster_members %}
|
|
||||||
{%- 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) %}
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
LimitNOFILE={{ calculated_max_connections }}
|
LimitNOFILE={{ galera_file_limits }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user