Enable usage of "short names" for Galera cluster
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Wed, 5 Oct 2016 07:48:32 +0000 (10:48 +0300)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Wed, 5 Oct 2016 07:56:00 +0000 (10:56 +0300)
We're not able to use FQDNs yet, so to work around this, we give
precedence to a "short name" list we'll get from t-h-t.

Change-Id: I4ef7786474c229d5212a0deb2ca02ee992b030d8
Related-Bug: #1628521

manifests/profile/pacemaker/database/mysql.pp

index 0169e16..7464854 100644 (file)
@@ -45,7 +45,12 @@ class tripleo::profile::pacemaker::database::mysql (
 
   # 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))
+  # The galera node names need to match the pacemaker node names... so if we
+  # want to use FQDNs for this, the cluster will not finish bootstrapping,
+  # since all the nodes will be marked as slaves. For now, we'll stick to the
+  # short name which is already registered in pacemaker until we get around
+  # this issue.
+  $galera_node_names_lookup = hiera('mysql_short_node_names', hiera('mysql_node_names', $::hostname))
   if is_array($galera_node_names_lookup) {
     $galera_nodes = downcase(join($galera_node_names_lookup, ','))
   } else {