aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/pacemaker')
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp23
-rw-r--r--manifests/profile/pacemaker/manila.pp8
2 files changed, 23 insertions, 8 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 4c54309..0169e16 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -18,20 +18,30 @@
#
# === Parameters
#
+# [*bind_address*]
+# (Optional) The address that the local mysql instance should bind to.
+# Defaults to $::hostname
+#
+# [*gmcast_listen_addr*]
+# (Optional) This variable defines the address on which the node listens to
+# connections from other nodes in the cluster.
+# Defaults to hiera('mysql_bind_host')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::database::mysql (
- $step = hiera('step'),
+ $bind_address = $::hostname,
+ $gmcast_listen_addr = hiera('mysql_bind_host'),
+ $step = hiera('step'),
) {
if $::hostname == downcase(hiera('bootstrap_nodeid')) {
$pacemaker_master = true
} else {
$pacemaker_master = false
}
- $mysql_bind_host = hiera('mysql_bind_host')
# use only mysql_node_names when we land a patch in t-h-t that
# switches to autogenerating these values from composable services
@@ -52,7 +62,7 @@ class tripleo::profile::pacemaker::database::mysql (
'innodb_locks_unsafe_for_binlog'=> '1',
'query_cache_size' => '0',
'query_cache_type' => '0',
- 'bind-address' => $::hostname,
+ 'bind-address' => $bind_address,
'max_connections' => hiera('mysql_max_connections'),
'open_files_limit' => '-1',
'wsrep_on' => 'ON',
@@ -70,7 +80,7 @@ class tripleo::profile::pacemaker::database::mysql (
'wsrep_drupal_282555_workaround'=> '0',
'wsrep_causal_reads' => '0',
'wsrep_sst_method' => 'rsync',
- 'wsrep_provider_options' => "gmcast.listen_addr=tcp://${mysql_bind_host}:4567;",
+ 'wsrep_provider_options' => "gmcast.listen_addr=tcp://${gmcast_listen_addr}:4567;",
}
}
@@ -120,6 +130,11 @@ class tripleo::profile::pacemaker::database::mysql (
table => '*.*',
user => 'clustercheck@localhost',
}
+
+ # We create databases for services at step 2 as well. This ensures
+ # Galara is up before those get created
+ Exec['galera-ready'] -> Mysql_database<||>
+
}
# This step is to create a sysconfig clustercheck file with the root user and empty password
# on the first install only (because later on the clustercheck db user will be used)
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index 45373f6..a1ff5ca 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -46,11 +46,11 @@ class tripleo::profile::pacemaker::manila (
stop => '/bin/true',
}
- if $step >= 4 {
- include ::tripleo::profile::base::manila::api
- include ::tripleo::profile::base::manila::scheduler
- include ::tripleo::profile::base::manila::share
+ include ::tripleo::profile::base::manila::api
+ include ::tripleo::profile::base::manila::scheduler
+ include ::tripleo::profile::base::manila::share
+ if $step >= 4 {
# manila generic:
$manila_generic_enable = hiera('manila_generic_enable_backend', false)
if $manila_generic_enable {