Add support for Pacemaker Remote to stonith drivers.

Pacemaker remote nodes don't have Corosync installed, nor can/should
they, so we no longer include its class when stonith devices are being
configured on Pacemaker Remote nodes.

Change-Id: Ifb4d19a6b9920b0e340555d6441878c7234eb197
Partial-Bug: #1686115
This commit is contained in:
Chris Jones 2017-04-25 17:43:48 +01:00
parent 56ef1e2dc9
commit aa42b5dc30
32 changed files with 160 additions and 64 deletions

View File

@ -116,11 +116,14 @@ define pacemaker::stonith::#{@parser.getAgentName} (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-#{@parser.getAgentName}-${safe_title}": exec { "Delete stonith-#{@parser.getAgentName}-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-#{@parser.getAgentName}-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-#{@parser.getAgentName}-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-#{@parser.getAgentName}-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-#{@parser.getAgentName}-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -131,7 +134,7 @@ define pacemaker::stonith::#{@parser.getAgentName} (
unless => "/usr/sbin/pcs stonith show stonith-#{@parser.getAgentName}-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-#{@parser.getAgentName}-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-#{@parser.getAgentName}-${safe_title}": exec { "Add non-local constraint for stonith-#{@parser.getAgentName}-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-#{@parser.getAgentName}-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-#{@parser.getAgentName}-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -248,11 +248,14 @@ define pacemaker::stonith::fence_apc (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_apc-${safe_title}": exec { "Delete stonith-fence_apc-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_apc-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_apc-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_apc-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_apc-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -263,7 +266,7 @@ define pacemaker::stonith::fence_apc (
unless => "/usr/sbin/pcs stonith show stonith-fence_apc-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_apc-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_apc-${safe_title}": exec { "Add non-local constraint for stonith-fence_apc-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_apc-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_apc-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_apc_snmp (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_apc_snmp-${safe_title}": exec { "Delete stonith-fence_apc_snmp-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_apc_snmp-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_apc_snmp-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_apc_snmp-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_apc_snmp-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_apc_snmp (
unless => "/usr/sbin/pcs stonith show stonith-fence_apc_snmp-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_apc_snmp-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_apc_snmp-${safe_title}": exec { "Add non-local constraint for stonith-fence_apc_snmp-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_apc_snmp-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_apc_snmp-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -248,11 +248,14 @@ define pacemaker::stonith::fence_bladecenter (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_bladecenter-${safe_title}": exec { "Delete stonith-fence_bladecenter-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_bladecenter-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_bladecenter-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_bladecenter-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_bladecenter-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -263,7 +266,7 @@ define pacemaker::stonith::fence_bladecenter (
unless => "/usr/sbin/pcs stonith show stonith-fence_bladecenter-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_bladecenter-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_bladecenter-${safe_title}": exec { "Add non-local constraint for stonith-fence_bladecenter-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_bladecenter-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_bladecenter-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -240,11 +240,14 @@ define pacemaker::stonith::fence_brocade (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_brocade-${safe_title}": exec { "Delete stonith-fence_brocade-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_brocade-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_brocade-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_brocade-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_brocade-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -255,7 +258,7 @@ define pacemaker::stonith::fence_brocade (
unless => "/usr/sbin/pcs stonith show stonith-fence_brocade-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_brocade-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_brocade-${safe_title}": exec { "Add non-local constraint for stonith-fence_brocade-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_brocade-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_brocade-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_cisco_mds (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_cisco_mds-${safe_title}": exec { "Delete stonith-fence_cisco_mds-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_cisco_mds-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_cisco_mds-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_cisco_mds-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_cisco_mds-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_cisco_mds (
unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_mds-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_mds-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_cisco_mds-${safe_title}": exec { "Add non-local constraint for stonith-fence_cisco_mds-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_cisco_mds-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_cisco_mds-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -248,11 +248,14 @@ define pacemaker::stonith::fence_cisco_ucs (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_cisco_ucs-${safe_title}": exec { "Delete stonith-fence_cisco_ucs-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_cisco_ucs-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_cisco_ucs-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_cisco_ucs-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_cisco_ucs-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -263,7 +266,7 @@ define pacemaker::stonith::fence_cisco_ucs (
unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_ucs-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_ucs-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_cisco_ucs-${safe_title}": exec { "Add non-local constraint for stonith-fence_cisco_ucs-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_cisco_ucs-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_cisco_ucs-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -248,11 +248,14 @@ define pacemaker::stonith::fence_drac5 (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_drac5-${safe_title}": exec { "Delete stonith-fence_drac5-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_drac5-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_drac5-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_drac5-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_drac5-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -263,7 +266,7 @@ define pacemaker::stonith::fence_drac5 (
unless => "/usr/sbin/pcs stonith show stonith-fence_drac5-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_drac5-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_drac5-${safe_title}": exec { "Add non-local constraint for stonith-fence_drac5-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_drac5-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_drac5-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_eaton_snmp (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_eaton_snmp-${safe_title}": exec { "Delete stonith-fence_eaton_snmp-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_eaton_snmp-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_eaton_snmp-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_eaton_snmp-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_eaton_snmp-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_eaton_snmp (
unless => "/usr/sbin/pcs stonith show stonith-fence_eaton_snmp-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_eaton_snmp-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_eaton_snmp-${safe_title}": exec { "Add non-local constraint for stonith-fence_eaton_snmp-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_eaton_snmp-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_eaton_snmp-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -216,11 +216,14 @@ define pacemaker::stonith::fence_eps (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_eps-${safe_title}": exec { "Delete stonith-fence_eps-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_eps-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_eps-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_eps-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_eps-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -231,7 +234,7 @@ define pacemaker::stonith::fence_eps (
unless => "/usr/sbin/pcs stonith show stonith-fence_eps-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_eps-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_eps-${safe_title}": exec { "Add non-local constraint for stonith-fence_eps-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_eps-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_eps-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -248,11 +248,14 @@ define pacemaker::stonith::fence_hpblade (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_hpblade-${safe_title}": exec { "Delete stonith-fence_hpblade-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_hpblade-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_hpblade-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_hpblade-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_hpblade-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -263,7 +266,7 @@ define pacemaker::stonith::fence_hpblade (
unless => "/usr/sbin/pcs stonith show stonith-fence_hpblade-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_hpblade-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_hpblade-${safe_title}": exec { "Add non-local constraint for stonith-fence_hpblade-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_hpblade-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_hpblade-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_ibmblade (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ibmblade-${safe_title}": exec { "Delete stonith-fence_ibmblade-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ibmblade-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ibmblade-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ibmblade-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ibmblade-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_ibmblade (
unless => "/usr/sbin/pcs stonith show stonith-fence_ibmblade-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ibmblade-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ibmblade-${safe_title}": exec { "Add non-local constraint for stonith-fence_ibmblade-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ibmblade-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ibmblade-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -176,11 +176,14 @@ define pacemaker::stonith::fence_idrac (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_idrac-${safe_title}": exec { "Delete stonith-fence_idrac-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_idrac-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_idrac-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_idrac-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_idrac-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -191,7 +194,7 @@ define pacemaker::stonith::fence_idrac (
unless => "/usr/sbin/pcs stonith show stonith-fence_idrac-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_idrac-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_idrac-${safe_title}": exec { "Add non-local constraint for stonith-fence_idrac-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_idrac-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_idrac-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_ifmib (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ifmib-${safe_title}": exec { "Delete stonith-fence_ifmib-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ifmib-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ifmib-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ifmib-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ifmib-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_ifmib (
unless => "/usr/sbin/pcs stonith show stonith-fence_ifmib-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ifmib-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ifmib-${safe_title}": exec { "Add non-local constraint for stonith-fence_ifmib-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ifmib-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ifmib-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -232,11 +232,14 @@ define pacemaker::stonith::fence_ilo (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ilo-${safe_title}": exec { "Delete stonith-fence_ilo-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ilo-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ilo-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -247,7 +250,7 @@ define pacemaker::stonith::fence_ilo (
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ilo-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ilo-${safe_title}": exec { "Add non-local constraint for stonith-fence_ilo-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ilo-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ilo-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -232,11 +232,14 @@ define pacemaker::stonith::fence_ilo2 (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ilo2-${safe_title}": exec { "Delete stonith-fence_ilo2-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ilo2-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ilo2-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo2-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo2-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -247,7 +250,7 @@ define pacemaker::stonith::fence_ilo2 (
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo2-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ilo2-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ilo2-${safe_title}": exec { "Add non-local constraint for stonith-fence_ilo2-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ilo2-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ilo2-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -176,11 +176,14 @@ define pacemaker::stonith::fence_ilo3 (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ilo3-${safe_title}": exec { "Delete stonith-fence_ilo3-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ilo3-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ilo3-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo3-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo3-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -191,7 +194,7 @@ define pacemaker::stonith::fence_ilo3 (
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo3-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ilo3-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ilo3-${safe_title}": exec { "Add non-local constraint for stonith-fence_ilo3-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ilo3-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ilo3-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -176,11 +176,14 @@ define pacemaker::stonith::fence_ilo4 (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ilo4-${safe_title}": exec { "Delete stonith-fence_ilo4-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ilo4-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ilo4-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo4-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo4-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -191,7 +194,7 @@ define pacemaker::stonith::fence_ilo4 (
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo4-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ilo4-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ilo4-${safe_title}": exec { "Add non-local constraint for stonith-fence_ilo4-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ilo4-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ilo4-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -224,11 +224,14 @@ define pacemaker::stonith::fence_ilo_mp (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ilo_mp-${safe_title}": exec { "Delete stonith-fence_ilo_mp-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ilo_mp-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ilo_mp-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo_mp-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ilo_mp-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -239,7 +242,7 @@ define pacemaker::stonith::fence_ilo_mp (
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo_mp-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ilo_mp-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ilo_mp-${safe_title}": exec { "Add non-local constraint for stonith-fence_ilo_mp-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ilo_mp-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ilo_mp-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -176,11 +176,14 @@ define pacemaker::stonith::fence_imm (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_imm-${safe_title}": exec { "Delete stonith-fence_imm-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_imm-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_imm-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_imm-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_imm-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -191,7 +194,7 @@ define pacemaker::stonith::fence_imm (
unless => "/usr/sbin/pcs stonith show stonith-fence_imm-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_imm-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_imm-${safe_title}": exec { "Add non-local constraint for stonith-fence_imm-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_imm-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_imm-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_intelmodular (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_intelmodular-${safe_title}": exec { "Delete stonith-fence_intelmodular-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_intelmodular-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_intelmodular-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_intelmodular-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_intelmodular-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_intelmodular (
unless => "/usr/sbin/pcs stonith show stonith-fence_intelmodular-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_intelmodular-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_intelmodular-${safe_title}": exec { "Add non-local constraint for stonith-fence_intelmodular-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_intelmodular-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_intelmodular-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -264,11 +264,14 @@ define pacemaker::stonith::fence_ipdu (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ipdu-${safe_title}": exec { "Delete stonith-fence_ipdu-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ipdu-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ipdu-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ipdu-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ipdu-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -279,7 +282,7 @@ define pacemaker::stonith::fence_ipdu (
unless => "/usr/sbin/pcs stonith show stonith-fence_ipdu-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ipdu-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ipdu-${safe_title}": exec { "Add non-local constraint for stonith-fence_ipdu-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ipdu-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ipdu-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -184,11 +184,14 @@ define pacemaker::stonith::fence_ipmilan (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ipmilan-${safe_title}": exec { "Delete stonith-fence_ipmilan-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ipmilan-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ipmilan-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ipmilan-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ipmilan-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -199,7 +202,7 @@ define pacemaker::stonith::fence_ipmilan (
unless => "/usr/sbin/pcs stonith show stonith-fence_ipmilan-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ipmilan-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ipmilan-${safe_title}": exec { "Add non-local constraint for stonith-fence_ipmilan-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ipmilan-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ipmilan-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -141,11 +141,14 @@ define pacemaker::stonith::fence_ironic (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_ironic-${safe_title}": exec { "Delete stonith-fence_ironic-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_ironic-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_ironic-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_ironic-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_ironic-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -156,7 +159,7 @@ define pacemaker::stonith::fence_ironic (
unless => "/usr/sbin/pcs stonith show stonith-fence_ironic-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_ironic-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_ironic-${safe_title}": exec { "Add non-local constraint for stonith-fence_ironic-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_ironic-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_ironic-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -120,11 +120,14 @@ define pacemaker::stonith::fence_kdump (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_kdump-${safe_title}": exec { "Delete stonith-fence_kdump-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_kdump-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_kdump-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_kdump-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_kdump-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -135,7 +138,7 @@ define pacemaker::stonith::fence_kdump (
unless => "/usr/sbin/pcs stonith show stonith-fence_kdump-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_kdump-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_kdump-${safe_title}": exec { "Add non-local constraint for stonith-fence_kdump-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_kdump-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_kdump-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -240,11 +240,14 @@ define pacemaker::stonith::fence_rhevm (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_rhevm-${safe_title}": exec { "Delete stonith-fence_rhevm-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_rhevm-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_rhevm-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_rhevm-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_rhevm-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -255,7 +258,7 @@ define pacemaker::stonith::fence_rhevm (
unless => "/usr/sbin/pcs stonith show stonith-fence_rhevm-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_rhevm-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_rhevm-${safe_title}": exec { "Add non-local constraint for stonith-fence_rhevm-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_rhevm-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_rhevm-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -224,11 +224,14 @@ define pacemaker::stonith::fence_rsb (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_rsb-${safe_title}": exec { "Delete stonith-fence_rsb-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_rsb-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_rsb-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_rsb-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_rsb-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -239,7 +242,7 @@ define pacemaker::stonith::fence_rsb (
unless => "/usr/sbin/pcs stonith show stonith-fence_rsb-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_rsb-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_rsb-${safe_title}": exec { "Add non-local constraint for stonith-fence_rsb-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_rsb-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_rsb-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -120,11 +120,14 @@ define pacemaker::stonith::fence_scsi (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_scsi-${safe_title}": exec { "Delete stonith-fence_scsi-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_scsi-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_scsi-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_scsi-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_scsi-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -135,7 +138,7 @@ define pacemaker::stonith::fence_scsi (
unless => "/usr/sbin/pcs stonith show stonith-fence_scsi-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_scsi-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_scsi-${safe_title}": exec { "Add non-local constraint for stonith-fence_scsi-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_scsi-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_scsi-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -144,11 +144,14 @@ define pacemaker::stonith::fence_virt (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_virt-${safe_title}": exec { "Delete stonith-fence_virt-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_virt-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_virt-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_virt-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_virt-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -159,7 +162,7 @@ define pacemaker::stonith::fence_virt (
unless => "/usr/sbin/pcs stonith show stonith-fence_virt-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_virt-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_virt-${safe_title}": exec { "Add non-local constraint for stonith-fence_virt-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_virt-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_virt-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -240,11 +240,14 @@ define pacemaker::stonith::fence_vmware_soap (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_vmware_soap-${safe_title}": exec { "Delete stonith-fence_vmware_soap-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_vmware_soap-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_vmware_soap-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_vmware_soap-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_vmware_soap-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -255,7 +258,7 @@ define pacemaker::stonith::fence_vmware_soap (
unless => "/usr/sbin/pcs stonith show stonith-fence_vmware_soap-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_vmware_soap-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_vmware_soap-${safe_title}": exec { "Add non-local constraint for stonith-fence_vmware_soap-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_vmware_soap-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_vmware_soap-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -240,11 +240,14 @@ define pacemaker::stonith::fence_wti (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_wti-${safe_title}": exec { "Delete stonith-fence_wti-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_wti-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_wti-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_wti-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_wti-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
package { package {
@ -255,7 +258,7 @@ define pacemaker::stonith::fence_wti (
unless => "/usr/sbin/pcs stonith show stonith-fence_wti-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_wti-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_wti-${safe_title}": exec { "Add non-local constraint for stonith-fence_wti-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_wti-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_wti-${safe_title} avoids ${pcmk_host_value_chunk}",

View File

@ -202,11 +202,14 @@ define pacemaker::stonith::fence_xvm (
# $title can be a mac address, remove the colons for pcmk resource name # $title can be a mac address, remove the colons for pcmk resource name
$safe_title = regsubst($title, ':', '', 'G') $safe_title = regsubst($title, ':', '', 'G')
# On Pacemaker Remote nodes we don't want a full corosync
$pcmk_require = str2bool($::pcmk_is_remote) ? { true => [], false => Class['pacemaker::corosync'] }
if($ensure == absent) { if($ensure == absent) {
exec { "Delete stonith-fence_xvm-${safe_title}": exec { "Delete stonith-fence_xvm-${safe_title}":
command => "/usr/sbin/pcs stonith delete stonith-fence_xvm-${safe_title}", command => "/usr/sbin/pcs stonith delete stonith-fence_xvm-${safe_title}",
onlyif => "/usr/sbin/pcs stonith show stonith-fence_xvm-${safe_title} > /dev/null 2>&1", onlyif => "/usr/sbin/pcs stonith show stonith-fence_xvm-${safe_title} > /dev/null 2>&1",
require => Class['pacemaker::corosync'], require => $pcmk_require,
} }
} else { } else {
if str2bool($manage_key_file) { if str2bool($manage_key_file) {
@ -256,7 +259,7 @@ define pacemaker::stonith::fence_xvm (
unless => "/usr/sbin/pcs stonith show stonith-fence_xvm-${safe_title} > /dev/null 2>&1", unless => "/usr/sbin/pcs stonith show stonith-fence_xvm-${safe_title} > /dev/null 2>&1",
tries => $tries, tries => $tries,
try_sleep => $try_sleep, try_sleep => $try_sleep,
require => Class['pacemaker::corosync'], require => $pcmk_require,
} ~> } ~>
exec { "Add non-local constraint for stonith-fence_xvm-${safe_title}": exec { "Add non-local constraint for stonith-fence_xvm-${safe_title}":
command => "/usr/sbin/pcs constraint location stonith-fence_xvm-${safe_title} avoids ${pcmk_host_value_chunk}", command => "/usr/sbin/pcs constraint location stonith-fence_xvm-${safe_title} avoids ${pcmk_host_value_chunk}",