summaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/pacemaker')
-rw-r--r--manifests/profile/pacemaker/ceph/rbdmirror.pp2
-rw-r--r--manifests/profile/pacemaker/cinder/backup.pp2
-rw-r--r--manifests/profile/pacemaker/cinder/backup_bundle.pp2
-rw-r--r--manifests/profile/pacemaker/cinder/volume.pp2
-rw-r--r--manifests/profile/pacemaker/cinder/volume_bundle.pp2
-rw-r--r--manifests/profile/pacemaker/clustercheck.pp2
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp2
-rw-r--r--manifests/profile/pacemaker/database/mysql_bundle.pp7
-rw-r--r--manifests/profile/pacemaker/database/redis.pp2
-rw-r--r--manifests/profile/pacemaker/database/redis_bundle.pp7
-rw-r--r--manifests/profile/pacemaker/haproxy.pp2
-rw-r--r--manifests/profile/pacemaker/haproxy_bundle.pp3
-rw-r--r--manifests/profile/pacemaker/manila.pp2
-rw-r--r--manifests/profile/pacemaker/neutron/lbaas.pp2
-rw-r--r--manifests/profile/pacemaker/ovn_northd.pp38
-rw-r--r--manifests/profile/pacemaker/rabbitmq.pp2
-rw-r--r--manifests/profile/pacemaker/rabbitmq_bundle.pp7
17 files changed, 40 insertions, 46 deletions
diff --git a/manifests/profile/pacemaker/ceph/rbdmirror.pp b/manifests/profile/pacemaker/ceph/rbdmirror.pp
index 4066225..6b566a7 100644
--- a/manifests/profile/pacemaker/ceph/rbdmirror.pp
+++ b/manifests/profile/pacemaker/ceph/rbdmirror.pp
@@ -45,7 +45,7 @@ class tripleo::profile::pacemaker::ceph::rbdmirror (
$client_name = 'openstack',
$pcs_tries = hiera('pcs_tries', 20),
$stack_action = hiera('stack_action'),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
Service <| tag == 'ceph-rbd-mirror' |> {
hasrestart => true,
diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp
index ff0d8c9..933a735 100644
--- a/manifests/profile/pacemaker/cinder/backup.pp
+++ b/manifests/profile/pacemaker/cinder/backup.pp
@@ -33,7 +33,7 @@
#
class tripleo::profile::pacemaker::cinder::backup (
$bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
diff --git a/manifests/profile/pacemaker/cinder/backup_bundle.pp b/manifests/profile/pacemaker/cinder/backup_bundle.pp
index cd06986..a5e1a9b 100644
--- a/manifests/profile/pacemaker/cinder/backup_bundle.pp
+++ b/manifests/profile/pacemaker/cinder/backup_bundle.pp
@@ -40,7 +40,7 @@ class tripleo::profile::pacemaker::cinder::backup_bundle (
$bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'),
$cinder_backup_docker_image = hiera('tripleo::profile::pacemaker::cinder::backup_bundle::cinder_backup_docker_image', undef),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp
index 0d6a598..e993426 100644
--- a/manifests/profile/pacemaker/cinder/volume.pp
+++ b/manifests/profile/pacemaker/cinder/volume.pp
@@ -33,7 +33,7 @@
#
class tripleo::profile::pacemaker::cinder::volume (
$bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
Service <| tag == 'cinder::volume' |> {
diff --git a/manifests/profile/pacemaker/cinder/volume_bundle.pp b/manifests/profile/pacemaker/cinder/volume_bundle.pp
index f0858c9..39199a5 100644
--- a/manifests/profile/pacemaker/cinder/volume_bundle.pp
+++ b/manifests/profile/pacemaker/cinder/volume_bundle.pp
@@ -40,7 +40,7 @@ class tripleo::profile::pacemaker::cinder::volume_bundle (
$bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'),
$cinder_volume_docker_image = hiera('tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image', undef),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
diff --git a/manifests/profile/pacemaker/clustercheck.pp b/manifests/profile/pacemaker/clustercheck.pp
index fad30da..958f4a2 100644
--- a/manifests/profile/pacemaker/clustercheck.pp
+++ b/manifests/profile/pacemaker/clustercheck.pp
@@ -32,7 +32,7 @@
#
#
class tripleo::profile::pacemaker::clustercheck (
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$clustercheck_password = hiera('mysql::server::root_password'),
$bind_address = hiera('mysql_bind_host'),
) {
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index d42d557..3aff62f 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -44,7 +44,7 @@ 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'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
if $::hostname == downcase($bootstrap_node) {
diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp
index 451d7f7..56e9e28 100644
--- a/manifests/profile/pacemaker/database/mysql_bundle.pp
+++ b/manifests/profile/pacemaker/database/mysql_bundle.pp
@@ -56,7 +56,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
$bind_address = $::hostname,
$gmcast_listen_addr = hiera('mysql_bind_host'),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@@ -199,6 +199,11 @@ MYSQL_HOST=localhost\n",
image => $mysql_docker_image,
replicas => $galera_nodes_count,
masters => $galera_nodes_count,
+ location_rule => {
+ resource_discovery => 'exclusive',
+ score => 0,
+ expression => ['galera-role eq true'],
+ },
container_options => 'network=host',
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
run_command => '/bin/bash /usr/local/bin/kolla_start',
diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp
index 4f5a861..bc91be7 100644
--- a/manifests/profile/pacemaker/database/redis.pp
+++ b/manifests/profile/pacemaker/database/redis.pp
@@ -46,7 +46,7 @@
class tripleo::profile::pacemaker::database::redis (
$bootstrap_node = hiera('redis_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$redis_file_limit = undef,
$pcs_tries = hiera('pcs_tries', 20),
) {
diff --git a/manifests/profile/pacemaker/database/redis_bundle.pp b/manifests/profile/pacemaker/database/redis_bundle.pp
index 167e54a..dd090d7 100644
--- a/manifests/profile/pacemaker/database/redis_bundle.pp
+++ b/manifests/profile/pacemaker/database/redis_bundle.pp
@@ -45,7 +45,7 @@ class tripleo::profile::pacemaker::database::redis_bundle (
$redis_docker_image = hiera('tripleo::profile::pacemaker::database::redis_bundle::redis_docker_image', undef),
$redis_docker_control_port = hiera('tripleo::profile::pacemaker::database::redis_bundle::control_port', '3124'),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@@ -73,6 +73,11 @@ class tripleo::profile::pacemaker::database::redis_bundle (
image => $redis_docker_image,
replicas => $redis_nodes_count,
masters => 1,
+ location_rule => {
+ resource_discovery => 'exclusive',
+ score => 0,
+ expression => ['redis-role eq true'],
+ },
container_options => 'network=host',
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
run_command => '/bin/bash /usr/local/bin/kolla_start',
diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp
index f006f78..7331071 100644
--- a/manifests/profile/pacemaker/haproxy.pp
+++ b/manifests/profile/pacemaker/haproxy.pp
@@ -38,7 +38,7 @@
class tripleo::profile::pacemaker::haproxy (
$bootstrap_node = hiera('haproxy_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
include ::tripleo::profile::base::haproxy
diff --git a/manifests/profile/pacemaker/haproxy_bundle.pp b/manifests/profile/pacemaker/haproxy_bundle.pp
index 3e7b7dd..9c1bdf3 100644
--- a/manifests/profile/pacemaker/haproxy_bundle.pp
+++ b/manifests/profile/pacemaker/haproxy_bundle.pp
@@ -43,7 +43,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
$haproxy_docker_image = hiera('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef),
$bootstrap_node = hiera('haproxy_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
include ::tripleo::profile::base::haproxy
@@ -87,6 +87,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
pacemaker::resource::bundle { 'haproxy-bundle':
image => $haproxy_docker_image,
replicas => $haproxy_nodes_count,
+ location_rule => $haproxy_location_rule,
container_options => 'network=host',
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
run_command => '/bin/bash /usr/local/bin/kolla_start',
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index 7bcf8d6..c22a033 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -55,7 +55,7 @@ class tripleo::profile::pacemaker::manila (
$backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false),
$ceph_mds_enabled = hiera('ceph_mds_enabled', false),
$bootstrap_node = hiera('manila_share_short_bootstrap_node_name'),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
) {
if $::hostname == downcase($bootstrap_node) {
diff --git a/manifests/profile/pacemaker/neutron/lbaas.pp b/manifests/profile/pacemaker/neutron/lbaas.pp
index 96712d4..9e86dfe 100644
--- a/manifests/profile/pacemaker/neutron/lbaas.pp
+++ b/manifests/profile/pacemaker/neutron/lbaas.pp
@@ -28,7 +28,7 @@
# Defaults to hiera('bootstrap_nodeid')
#
class tripleo::profile::pacemaker::neutron::lbaas (
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pacemaker_master = hiera('bootstrap_nodeid'),
) {
diff --git a/manifests/profile/pacemaker/ovn_northd.pp b/manifests/profile/pacemaker/ovn_northd.pp
index af946af..212c345 100644
--- a/manifests/profile/pacemaker/ovn_northd.pp
+++ b/manifests/profile/pacemaker/ovn_northd.pp
@@ -32,7 +32,8 @@
# Defaults to hiera('pcs_tries', 20)
#
# [*ovn_dbs_vip*]
-# (Optional) The OVN database virtual IP to be managed by the pacemaker.
+# (Optional) The vip to be used for OVN DB servers. It is expected that
+# the vip resource to be created before calling this class.
# Defaults to hiera('ovn_dbs_vip')
#
# [*nb_db_port*]
@@ -46,7 +47,7 @@
class tripleo::profile::pacemaker::ovn_northd (
$pacemaker_master = hiera('ovn_dbs_short_bootstrap_node_name'),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$ovn_dbs_vip = hiera('ovn_dbs_vip'),
$nb_db_port = 6641,
@@ -67,21 +68,9 @@ class tripleo::profile::pacemaker::ovn_northd (
$ovndb_servers_ocf_name = 'ovn:ovndb-servers'
$ovndb_vip_resource_name = "ip-${ovn_dbs_vip}"
- if is_ipv6_address($ovn_dbs_vip) {
- $netmask = '128'
- $nic = interface_for_ip($ovn_dbs_vip)
- } else {
- $netmask = '32'
- $nic = ''
- }
-
- pacemaker::resource::ip { "${ovndb_vip_resource_name}":
- ip_address => $ovn_dbs_vip,
- cidr_netmask => $netmask,
- nic => $nic,
- tries => $pcs_tries,
- }
-
+ # By step 3, all the VIPs would have been created.
+ # After creating ovn ocf resource, colocate it with the
+ # VIP - ip-${ovn_dbs_vip}.
pacemaker::resource::ocf { "${ovndb_servers_resource_name}":
ocf_agent_name => "${ovndb_servers_ocf_name}",
master_params => '',
@@ -96,15 +85,6 @@ class tripleo::profile::pacemaker::ovn_northd (
meta_params => 'notify=true'
}
- pacemaker::constraint::order { "${ovndb_vip_resource_name}-then-${ovndb_servers_resource_name}":
- first_resource => "${ovndb_vip_resource_name}",
- second_resource => "${ovndb_servers_resource_name}-master",
- first_action => 'start',
- second_action => 'start',
- constraint_params => 'kind=Mandatory',
- tries => $pcs_tries,
- }
-
pacemaker::constraint::colocation { "${ovndb_vip_resource_name}-with-${ovndb_servers_resource_name}":
source => "${ovndb_vip_resource_name}",
target => "${ovndb_servers_resource_name}-master",
@@ -113,9 +93,7 @@ class tripleo::profile::pacemaker::ovn_northd (
tries => $pcs_tries,
}
- Pacemaker::Resource::Ip["${ovndb_vip_resource_name}"] ->
- Pacemaker::Resource::Ocf["${ovndb_servers_resource_name}"] ->
- Pacemaker::Constraint::Order["${ovndb_vip_resource_name}-then-${ovndb_servers_resource_name}"] ->
- Pacemaker::Constraint::Colocation["${ovndb_vip_resource_name}-with-${ovndb_servers_resource_name}"]
+ Pacemaker::Resource::Ocf["${ovndb_servers_resource_name}"] ->
+ Pacemaker::Constraint::Colocation["${ovndb_vip_resource_name}-with-${ovndb_servers_resource_name}"]
}
}
diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp
index bf6a38d..3d87598 100644
--- a/manifests/profile/pacemaker/rabbitmq.pp
+++ b/manifests/profile/pacemaker/rabbitmq.pp
@@ -51,7 +51,7 @@ class tripleo::profile::pacemaker::rabbitmq (
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rabbit_nodes = hiera('rabbitmq_node_names'),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
diff --git a/manifests/profile/pacemaker/rabbitmq_bundle.pp b/manifests/profile/pacemaker/rabbitmq_bundle.pp
index b05b0b1..0a6295c 100644
--- a/manifests/profile/pacemaker/rabbitmq_bundle.pp
+++ b/manifests/profile/pacemaker/rabbitmq_bundle.pp
@@ -61,7 +61,7 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rabbit_nodes = hiera('rabbitmq_node_names'),
$pcs_tries = hiera('pcs_tries', 20),
- $step = hiera('step'),
+ $step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@@ -105,6 +105,11 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
pacemaker::resource::bundle { 'rabbitmq-bundle':
image => $rabbitmq_docker_image,
replicas => $rabbitmq_nodes_count,
+ location_rule => {
+ resource_discovery => 'exclusive',
+ score => 0,
+ expression => ['rabbitmq-role eq true'],
+ },
container_options => 'network=host',
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
run_command => '/bin/bash /usr/local/bin/kolla_start',