aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/database/mysql.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/database/mysql.pp')
-rw-r--r--manifests/profile/base/database/mysql.pp33
1 files changed, 23 insertions, 10 deletions
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index d3c3f21..b4ac8ac 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -42,11 +42,10 @@
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
#
-# [*generate_service_certificates*]
-# (Optional) Whether or not certmonger will generate certificates for
-# MySQL. This could be as many as specified by the $certificates_specs
-# variable.
-# Defaults to hiera('generate_service_certificate', false).
+# [*generate_dropin_file_limit*]
+# (Optional) Generate a systemd drop-in file to raise the file descriptor
+# limit for the mysql service.
+# Defaults to false
#
# [*manage_resources*]
# (Optional) Whether or not manage root user, root my.cnf, and service.
@@ -57,6 +56,10 @@
# Should be an hash.
# Defaults to {}
#
+# [*mysql_max_connections*]
+# (Optional) Maximum number of connections to MySQL.
+# Defaults to hiera('mysql_max_connections', undef)
+#
# [*remove_default_accounts*]
# (Optional) Whether or not remove default MySQL accounts.
# Defaults to true
@@ -72,9 +75,10 @@ class tripleo::profile::base::database::mysql (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$certificate_specs = {},
$enable_internal_tls = hiera('enable_internal_tls', false),
- $generate_service_certificates = hiera('generate_service_certificates', false),
+ $generate_dropin_file_limit = false,
$manage_resources = true,
$mysql_server_options = {},
+ $mysql_max_connections = hiera('mysql_max_connections', undef),
$remove_default_accounts = true,
$step = hiera('step'),
) {
@@ -89,9 +93,6 @@ class tripleo::profile::base::database::mysql (
validate_hash($certificate_specs)
if $enable_internal_tls {
- if $generate_service_certificates {
- ensure_resource('class', 'tripleo::certmonger::mysql', $certificate_specs)
- }
$tls_certfile = $certificate_specs['service_certificate']
$tls_keyfile = $certificate_specs['service_key']
} else {
@@ -120,7 +121,7 @@ class tripleo::profile::base::database::mysql (
$mysql_server_default = {
'mysqld' => {
'bind-address' => $bind_address,
- 'max_connections' => hiera('mysql_max_connections'),
+ 'max_connections' => $mysql_max_connections,
'open_files_limit' => '-1',
'innodb_file_per_table' => 'ON',
'ssl' => $enable_internal_tls,
@@ -139,6 +140,15 @@ class tripleo::profile::base::database::mysql (
service_enabled => $manage_resources,
remove_default_accounts => $remove_default_accounts,
}
+
+ if $generate_dropin_file_limit and $manage_resources {
+ # Raise the mysql file limit
+ ::systemd::service_limits { 'mariadb.service':
+ limits => {
+ 'LimitNOFILE' => 16384
+ }
+ }
+ }
}
if $step >= 2 and $sync_db {
@@ -167,6 +177,9 @@ class tripleo::profile::base::database::mysql (
if hiera('ironic_api_enabled', false) {
include ::ironic::db::mysql
}
+ if hiera('ironic_inspector_enabled', false) {
+ include ::ironic::inspector::db::mysql
+ }
if hiera('keystone_enabled', false) {
include ::keystone::db::mysql
}