Merge "[queens only] mysql: make nproc limit configurable" into stable/queens
This commit is contained in:
commit
4d9241c827
|
@ -87,6 +87,10 @@
|
|||
# (Optional) Maximum number of connections to MySQL.
|
||||
# Defaults to hiera('mysql_max_connections', undef)
|
||||
#
|
||||
# [*mysql_nproc_limit*]
|
||||
# (Optional) Maximum nproc limit in PAM for mysqld.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*remove_default_accounts*]
|
||||
# (Optional) Whether or not remove default MySQL accounts.
|
||||
# Defaults to true
|
||||
|
@ -112,6 +116,7 @@ class tripleo::profile::base::database::mysql (
|
|||
$manage_resources = true,
|
||||
$mysql_server_options = {},
|
||||
$mysql_max_connections = hiera('mysql_max_connections', undef),
|
||||
$mysql_nproc_limit = undef,
|
||||
$remove_default_accounts = true,
|
||||
$step = Integer(hiera('step')),
|
||||
) {
|
||||
|
@ -138,6 +143,15 @@ class tripleo::profile::base::database::mysql (
|
|||
$tls_cipher_list = undef
|
||||
}
|
||||
|
||||
if $mysql_nproc_limit {
|
||||
file { '/etc/security/limits.d/99-mysqld.conf':
|
||||
content => template('tripleo/mysql/limits.conf'),
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
}
|
||||
}
|
||||
|
||||
# non-ha scenario
|
||||
if $manage_resources {
|
||||
$mysql_step = 2
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
mysql soft nproc <%= @mysql_nproc_limit %>
|
||||
mysql hard nproc <%= @mysql_nproc_limit %>
|
Loading…
Reference in New Issue