Allow override of mysql/galera open files limit
This commit removes the hard coded value of open-file-limit (16384)
and allows operators to override it via:
tripleo::profile::pacemaker::database::mysql::open_files_limit
tripleo::profile::pacemaker::database::mysql_bundle::open_files_limit
manually cherry picked from: I4927eb65a2dc1b5a86fc2141c7b2713f36ad49de
Change-Id: Icecdf2f6c806b66266a0c10642b18f47a99d1e65
Closes-bug: #1883131
(cherry picked from commit e791ca04dd
)
This commit is contained in:
parent
6124a3330c
commit
73823d6340
|
@ -93,6 +93,10 @@
|
||||||
# (Optional) The number of times pcs commands should be retried.
|
# (Optional) The number of times pcs commands should be retried.
|
||||||
# Defaults to hiera('pcs_tries', 20)
|
# Defaults to hiera('pcs_tries', 20)
|
||||||
#
|
#
|
||||||
|
# [*open_files_limit*]
|
||||||
|
# (Optional) Maximum value for open-files-limit
|
||||||
|
# Defaults to 16384
|
||||||
|
#
|
||||||
class tripleo::profile::pacemaker::database::mysql (
|
class tripleo::profile::pacemaker::database::mysql (
|
||||||
$bootstrap_node = hiera('mysql_short_bootstrap_node_name'),
|
$bootstrap_node = hiera('mysql_short_bootstrap_node_name'),
|
||||||
$bind_address = $::hostname,
|
$bind_address = $::hostname,
|
||||||
|
@ -108,6 +112,7 @@ class tripleo::profile::pacemaker::database::mysql (
|
||||||
$ipv6 = str2bool(hiera('mysql_ipv6', false)),
|
$ipv6 = str2bool(hiera('mysql_ipv6', false)),
|
||||||
$step = Integer(hiera('step')),
|
$step = Integer(hiera('step')),
|
||||||
$pcs_tries = hiera('pcs_tries', 20),
|
$pcs_tries = hiera('pcs_tries', 20),
|
||||||
|
$open_files_limit = 16384,
|
||||||
) {
|
) {
|
||||||
if $::hostname == downcase($bootstrap_node) {
|
if $::hostname == downcase($bootstrap_node) {
|
||||||
$pacemaker_master = true
|
$pacemaker_master = true
|
||||||
|
@ -250,7 +255,7 @@ class tripleo::profile::pacemaker::database::mysql (
|
||||||
op_params => 'promote timeout=300s on-fail=block',
|
op_params => 'promote timeout=300s on-fail=block',
|
||||||
master_params => '',
|
master_params => '',
|
||||||
meta_params => "master-max=${galera_nodes_count} ordered=true",
|
meta_params => "master-max=${galera_nodes_count} ordered=true",
|
||||||
resource_params => "additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' cluster_host_map='${cluster_host_map}'",
|
resource_params => "additional_parameters='--open-files-limit=${open_files_limit}' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' cluster_host_map='${cluster_host_map}'",
|
||||||
tries => $pcs_tries,
|
tries => $pcs_tries,
|
||||||
location_rule => {
|
location_rule => {
|
||||||
resource_discovery => 'exclusive',
|
resource_discovery => 'exclusive',
|
||||||
|
|
|
@ -118,6 +118,10 @@
|
||||||
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
|
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
|
||||||
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
|
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
|
||||||
#
|
#
|
||||||
|
# [*open_files_limit*]
|
||||||
|
# (Optional) Maximum value for open-files-limit
|
||||||
|
# Defaults to 16384
|
||||||
|
#
|
||||||
class tripleo::profile::pacemaker::database::mysql_bundle (
|
class tripleo::profile::pacemaker::database::mysql_bundle (
|
||||||
$mysql_docker_image = hiera('tripleo::profile::pacemaker::database::mysql_bundle::mysql_docker_image', undef),
|
$mysql_docker_image = hiera('tripleo::profile::pacemaker::database::mysql_bundle::mysql_docker_image', undef),
|
||||||
$control_port = hiera('tripleo::profile::pacemaker::database::mysql_bundle::control_port', '3123'),
|
$control_port = hiera('tripleo::profile::pacemaker::database::mysql_bundle::control_port', '3123'),
|
||||||
|
@ -139,6 +143,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
|
||||||
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
|
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
|
||||||
$pcs_tries = hiera('pcs_tries', 20),
|
$pcs_tries = hiera('pcs_tries', 20),
|
||||||
$step = Integer(hiera('step')),
|
$step = Integer(hiera('step')),
|
||||||
|
$open_files_limit = 16384,
|
||||||
) {
|
) {
|
||||||
if $::hostname == downcase($bootstrap_node) {
|
if $::hostname == downcase($bootstrap_node) {
|
||||||
$pacemaker_master = true
|
$pacemaker_master = true
|
||||||
|
@ -415,7 +420,7 @@ MYSQL_HOST=localhost\n",
|
||||||
master_params => '',
|
master_params => '',
|
||||||
meta_params => "master-max=${galera_nodes_count} ordered=true container-attribute-target=host",
|
meta_params => "master-max=${galera_nodes_count} ordered=true container-attribute-target=host",
|
||||||
op_params => 'promote timeout=300s on-fail=block',
|
op_params => 'promote timeout=300s on-fail=block',
|
||||||
resource_params => "log='/var/log/mysql/mysqld.log' additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' cluster_host_map='${cluster_host_map_string}'",
|
resource_params => "log='/var/log/mysql/mysqld.log' additional_parameters='--open-files-limit=${open_files_limit}' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' cluster_host_map='${cluster_host_map_string}'",
|
||||||
tries => $pcs_tries,
|
tries => $pcs_tries,
|
||||||
location_rule => {
|
location_rule => {
|
||||||
resource_discovery => 'exclusive',
|
resource_discovery => 'exclusive',
|
||||||
|
|
Loading…
Reference in New Issue