aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker/database/mysql.pp
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-01-17 18:17:38 +0100
committerMichele Baldessari <michele@acksyn.org>2017-01-18 11:53:16 +0100
commitbf68fa9683ee30cc2ebdf624f47e82a4fcceb746 (patch)
treeca2690f895cf3ab53db5eb428816bfb8995006a2 /manifests/profile/pacemaker/database/mysql.pp
parent7c4e17059bf44c01a7b7023fdd93ed9d17c730ac (diff)
Do not depend on bootstrap_nodeid for any pacemaker profile
When we create a pacemaker resource it must happen from a single node. If it happens from multiple nodes an immediate error will be returned by pcs. For the pacemaker roles we enforce this by leveraging the recently introduced <SERVICE_NAME_bootstrap_short_node_name> which gives us the first hostname per-service, regardless of the role. (introduced via I03e8685f939e8ae1fcd8b16883b559615042505d) With this approach if a pacemaker service belongs to two different roles (say role Controller on node A and role galera on node B), it will only create the resource from one of the two and not both (which would return an error). Only setting Partial-Bug for this one, because it addresses the issue from the pacemaker resource creation POV (which is always affected). But the issue itself is a race that we're theoretically affected by since the composable roles work landed. While I have tried to fix the more general case in previous attempts, I think it is best if we start a discussion on how to fix it, because each approach has a bunch of potential drawbacks and is quite invasive on how we do things. A discussion slot for this has been proposed for the Atlanta PTG. Change-Id: I662398cab60d523d204b57a5674ca8f5c0f2e68a Partial-Bug: #1615983
Diffstat (limited to 'manifests/profile/pacemaker/database/mysql.pp')
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp8
1 files changed, 7 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index edd09bd..3506cb1 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('mysql_short_bootstrap_node_name')
+#
# [*bind_address*]
# (Optional) The address that the local mysql instance should bind to.
# Defaults to $::hostname
@@ -33,11 +37,12 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::database::mysql (
+ $bootstrap_node = hiera('mysql_short_bootstrap_node_name'),
$bind_address = $::hostname,
$gmcast_listen_addr = hiera('mysql_bind_host'),
$step = hiera('step'),
) {
- if $::hostname == downcase(hiera('bootstrap_nodeid')) {
+ if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
$pacemaker_master = false
@@ -100,6 +105,7 @@ class tripleo::profile::pacemaker::database::mysql (
}
class { '::tripleo::profile::base::database::mysql':
+ bootstrap_node => $bootstrap_node,
manage_resources => false,
remove_default_accounts => $remove_default_accounts,
mysql_server_options => $mysqld_options,