aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker/database/mysql_bundle.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/pacemaker/database/mysql_bundle.pp')
-rw-r--r--manifests/profile/pacemaker/database/mysql_bundle.pp9
1 files changed, 5 insertions, 4 deletions
diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp
index e07ac2e..1bcdbbe 100644
--- a/manifests/profile/pacemaker/database/mysql_bundle.pp
+++ b/manifests/profile/pacemaker/database/mysql_bundle.pp
@@ -100,9 +100,10 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
$galera_nodes_count = count($galera_nodes_array)
# construct a galera-pacemaker name mapping for the resource agent
- # [galera-bundle-0:galera_node[0], galera-bundle-1:galera_node[1], ... ,galera-bundle-n:galera_node[n]]
- $host_map_array = $galera_nodes_array.map |$i, $host| {
- "galera-bundle-${i}:${host}"
+ # [galera-0:galera-0.internalapi.local, ...]
+ $host_map_array_tmp = zip($galera_node_names_lookup, $galera_fqdns_names_lookup)
+ $host_map_array = $host_map_array_tmp.map |$i| {
+ "${i[0]}:${i[1]}"
}
$cluster_host_map_string = join($host_map_array, ';')
@@ -314,7 +315,7 @@ MYSQL_HOST=localhost\n",
pacemaker::resource::ocf { 'galera':
ocf_agent_name => 'heartbeat:galera',
master_params => '',
- meta_params => "master-max=${galera_nodes_count} ordered=true",
+ meta_params => "master-max=${galera_nodes_count} ordered=true container-attribute-target=host",
op_params => 'promote timeout=300s on-fail=block',
resource_params => "additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}' cluster_host_map='${cluster_host_map_string}'",
tries => $pcs_tries,