diff options
author | Jiri Stransky <jistr@redhat.com> | 2016-08-29 13:50:12 +0200 |
---|---|---|
committer | Jiri Stransky <jistr@redhat.com> | 2016-08-29 14:58:57 +0200 |
commit | b131512a1061046ce9f13ab715ce5362f48f25de (patch) | |
tree | 61c95b0ba1012c2c9ce6cee8e47006cc94379f04 /manifests | |
parent | cfe8fb0e00dfbf3fc2b1a3c68d44d8c4e5520b4b (diff) |
Handle galera_node_names being an array
Prepare the pacemaker mysql manifest that galera_node_names will be an
array. Stay backwards compatible to handle comma-delimited-string too
and avoid a chicken-and-egg patch problem between t-h-t and
puppet-tripleo.
Change-Id: Ia0d9d59728c8771974bfbc486f4929b99a38e4fb
Partially-Implements: blueprint custom-roles
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/profile/pacemaker/database/mysql.pp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index 31d7d80..bec955c 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -32,8 +32,17 @@ class tripleo::profile::pacemaker::database::mysql ( $pacemaker_master = false } $mysql_bind_host = hiera('mysql_bind_host') - $galera_nodes = downcase(hiera('galera_node_names', $::hostname)) + + # use only mysql_node_names when we land a patch in t-h-t that + # switches to autogenerating these values from composable services + $galera_node_names_lookup = hiera('mysql_node_names', hiera('galera_node_names', $::hostname)) + if is_array($galera_node_names_lookup) { + $galera_nodes = downcase(join($galera_node_names_lookup, ',')) + } else { + $galera_nodes = downcase($galera_node_names_lookup) + } $galera_nodes_count = count(split($galera_nodes, ',')) + $mysqld_options = { 'mysqld' => { 'skip-name-resolve' => '1', |