Browse Source

galera: expose 2-node mode for the galera resource

When deploying a 2-node HA overcloud, the galera resource
agent can be configured to enable a "2-node mode" heuristic,
that allows it to restart a galera node in the event of a
network split.

Make this resource agent's option available in puppet via
the new parameter "two_node_mode".

Closes-Bug: #1903051

Change-Id: I543ee77ec38b6429989435122ae0c257d279e507
(cherry picked from commit 5836bcc15b)
(cherry picked from commit 24d0ff54f3)
(cherry picked from commit 7e7aa969b7)
changes/37/762837/1
Damien Ciabrini 3 months ago
parent
commit
3e9b801d5d
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      manifests/profile/pacemaker/database/mysql_bundle.pp

+ 12
- 1
manifests/profile/pacemaker/database/mysql_bundle.pp View File

@ -96,6 +96,11 @@
# parameters to be passed to socat for tunneling SST connections.
# Defaults to undef
#
# [*two_node_mode*]
# (Optional) Whether to configure the resource agent in special
# 2-node cluster mode, to allow recovering from a network partition.
# Defaults to false
#
# [*ipv6*]
# (Optional) Whether to deploy MySQL on IPv6 network.
# Defaults to str2bool(hiera('mysql_ipv6', false))
@ -169,6 +174,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
$ipv6 = str2bool(hiera('mysql_ipv6', false)),
$mysql_server_options = hiera('tripleo::profile::base::database::mysql::mysql_server_options', {}),
$mysql_auth_ed25519 = hiera('mysql_auth_ed25519', false),
$two_node_mode = false,
$container_backend = 'docker',
$log_driver = undef,
$log_file = '/var/log/containers/stdouts/galera-bundle.log',
@ -460,6 +466,11 @@ MYSQL_HOST=localhost\n",
} else {
$tls_priorities_real = ''
}
if $two_node_mode == true {
$two_node_mode_opt = ' two_node_mode=true'
} else {
$two_node_mode_opt = ''
}
pacemaker::resource::bundle { 'galera-bundle':
image => $mysql_docker_image,
@ -487,7 +498,7 @@ MYSQL_HOST=localhost\n",
master_params => '',
meta_params => "master-max=${galera_nodes_count} ordered=true container-attribute-target=host",
op_params => "promote timeout=${promote_timeout}s on-fail=block",
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}'",
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}'${two_node_mode_opt}",
tries => $pcs_tries,
location_rule => {
resource_discovery => 'exclusive',


Loading…
Cancel
Save