aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2017-01-24 11:39:40 +0100
committerGiulio Fidente <gfidente@redhat.com>2017-01-26 20:33:40 +0000
commitbd98b128d7b3155cbf9207eaaa195484f3b36220 (patch)
tree8f65f866f9c92a090595368d8defb799dfb3d7df /manifests/profile
parent58200e33c29f15dbd7b2489789b0e8d7b0992c5d (diff)
Support composable HA for the Ceph rbdmirror daemon
Follow up patch for I63da4f48da14534fd76265764569e76300534472 to support composable HA for the Ceph rbdmirror daemon. Change-Id: I3767bee4b1c7849fa85e71bcc57534b393d2d415
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/pacemaker/ceph/rbdmirror.pp22
1 files changed, 21 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/ceph/rbdmirror.pp b/manifests/profile/pacemaker/ceph/rbdmirror.pp
index ea445a1..4066225 100644
--- a/manifests/profile/pacemaker/ceph/rbdmirror.pp
+++ b/manifests/profile/pacemaker/ceph/rbdmirror.pp
@@ -26,6 +26,10 @@
# (Optional) Name assigned to the RBD mirror client
# Defaults to 'rbd-mirror'
#
+# [*pcs_tries*]
+# (Optional) The number of times pcs commands should be retried.
+# Defaults to hiera('pcs_tries', 20)
+#
# [*stack_action*]
# (Optional) Action executed on the stack. See tripleo-heat-templates
# for more details.
@@ -39,6 +43,7 @@
class tripleo::profile::pacemaker::ceph::rbdmirror (
$bootstrap_node = hiera('ceph_rbdmirror_short_bootstrap_node_name'),
$client_name = 'openstack',
+ $pcs_tries = hiera('pcs_tries', 20),
$stack_action = hiera('stack_action'),
$step = hiera('step'),
) {
@@ -57,6 +62,15 @@ class tripleo::profile::pacemaker::ceph::rbdmirror (
include ::tripleo::profile::base::ceph
+ if $step >= 2 {
+ pacemaker::property { 'ceph-rbdmirror-role-node-property':
+ property => 'ceph-rbdmirror-role',
+ value => true,
+ tries => $pcs_tries,
+ node => $::hostname,
+ }
+ }
+
if $step >= 3 {
require ::ceph::profile::client
ceph::mirror { $client_name:
@@ -67,7 +81,13 @@ class tripleo::profile::pacemaker::ceph::rbdmirror (
# NOTE(gfidente): systemd uses the @ sign but it is an invalid
# character in a pcmk resource name, so we need to use it only
# for the name of the service
- service_name => "ceph-rbd-mirror@${client_name}"
+ service_name => "ceph-rbd-mirror@${client_name}",
+ tries => $pcs_tries,
+ location_rule => {
+ resource_discovery => 'exclusive',
+ score => 0,
+ expression => ['ceph-rbdmirror-role eq true'],
+ }
}
}