Add retry logic into fence agent manifests

This commit is contained in:
Jiri Stransky
2015-06-12 18:31:51 +02:00
parent 8f40e62acf
commit f62e67f3b4
31 changed files with 249 additions and 32 deletions

View File

@@ -81,10 +81,14 @@ define pacemaker::stonith::#{@parser.getAgentName} (
exec { "Create stonith-#{@parser.getAgentName}-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-#{@parser.getAgentName}-${safe_title} #{@parser.getAgentName} pcmk_host_list=\\"${pcmk_host_value_chunk}\\" #{getChunks} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-#{@parser.getAgentName}-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}
@@ -100,7 +104,10 @@ eos
text += "\n"
text += " $interval = \"60s\",\n"
text += " $ensure = present,\n"
text += " $pcmk_host_list = undef,"
text += " $pcmk_host_list = undef,\n"
text += "\n"
text += " $tries = undef,\n"
text += " $try_sleep = undef,"
return text
end

View File

@@ -27,6 +27,9 @@ define pacemaker::stonith::fence_apc (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -138,10 +141,14 @@ define pacemaker::stonith::fence_apc (
exec { "Create stonith-fence_apc-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_apc-${safe_title} fence_apc pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${port_chunk} ${switch_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_apc-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_apc_snmp (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_apc_snmp (
exec { "Create stonith-fence_apc_snmp-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_apc_snmp-${safe_title} fence_apc_snmp pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_apc_snmp-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -27,6 +27,9 @@ define pacemaker::stonith::fence_bladecenter (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -138,10 +141,14 @@ define pacemaker::stonith::fence_bladecenter (
exec { "Create stonith-fence_bladecenter-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_bladecenter-${safe_title} fence_bladecenter pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${missing_as_off_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_bladecenter-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -26,6 +26,9 @@ define pacemaker::stonith::fence_brocade (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -133,10 +136,14 @@ define pacemaker::stonith::fence_brocade (
exec { "Create stonith-fence_brocade-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_brocade-${safe_title} fence_brocade pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_brocade-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_cisco_mds (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_cisco_mds (
exec { "Create stonith-fence_cisco_mds-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_cisco_mds-${safe_title} fence_cisco_mds pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_mds-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -27,6 +27,9 @@ define pacemaker::stonith::fence_cisco_ucs (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -138,10 +141,14 @@ define pacemaker::stonith::fence_cisco_ucs (
exec { "Create stonith-fence_cisco_ucs-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_cisco_ucs-${safe_title} fence_cisco_ucs pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${ssl_chunk} ${notls_chunk} ${port_chunk} ${suborg_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${ssl_secure_chunk} ${ssl_insecure_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_cisco_ucs-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -27,6 +27,9 @@ define pacemaker::stonith::fence_drac5 (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -138,10 +141,14 @@ define pacemaker::stonith::fence_drac5 (
exec { "Create stonith-fence_drac5-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_drac5-${safe_title} fence_drac5 pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${drac_version_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_drac5-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_eaton_snmp (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_eaton_snmp (
exec { "Create stonith-fence_eaton_snmp-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_eaton_snmp-${safe_title} fence_eaton_snmp pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_eaton_snmp-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -23,6 +23,9 @@ define pacemaker::stonith::fence_eps (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -118,10 +121,14 @@ define pacemaker::stonith::fence_eps (
exec { "Create stonith-fence_eps-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_eps-${safe_title} fence_eps pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${hidden_page_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_eps-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -27,6 +27,9 @@ define pacemaker::stonith::fence_hpblade (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -138,10 +141,14 @@ define pacemaker::stonith::fence_hpblade (
exec { "Create stonith-fence_hpblade-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_hpblade-${safe_title} fence_hpblade pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${missing_as_off_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_hpblade-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_ibmblade (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_ibmblade (
exec { "Create stonith-fence_ibmblade-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ibmblade-${safe_title} fence_ibmblade pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ibmblade-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -18,6 +18,9 @@ define pacemaker::stonith::fence_idrac (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$auth_chunk = $auth ? {
undef => "",
@@ -93,10 +96,14 @@ define pacemaker::stonith::fence_idrac (
exec { "Create stonith-fence_idrac-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_idrac-${safe_title} fence_idrac pcmk_host_list=\"${pcmk_host_value_chunk}\" ${auth_chunk} ${ipaddr_chunk} ${passwd_chunk} ${passwd_script_chunk} ${lanplus_chunk} ${login_chunk} ${timeout_chunk} ${cipher_chunk} ${method_chunk} ${power_wait_chunk} ${delay_chunk} ${privlvl_chunk} ${verbose_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_idrac-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_ifmib (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_ifmib (
exec { "Create stonith-fence_ifmib-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ifmib-${safe_title} fence_ifmib pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ifmib-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -25,6 +25,9 @@ define pacemaker::stonith::fence_ilo (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -128,10 +131,14 @@ define pacemaker::stonith::fence_ilo (
exec { "Create stonith-fence_ilo-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ilo-${safe_title} fence_ilo pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${ssl_chunk} ${notls_chunk} ${ribcl_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${ssl_secure_chunk} ${ssl_insecure_chunk} ${verbose_chunk} ${debug_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -25,6 +25,9 @@ define pacemaker::stonith::fence_ilo2 (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -128,10 +131,14 @@ define pacemaker::stonith::fence_ilo2 (
exec { "Create stonith-fence_ilo2-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ilo2-${safe_title} fence_ilo2 pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${ssl_chunk} ${notls_chunk} ${ribcl_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${ssl_secure_chunk} ${ssl_insecure_chunk} ${verbose_chunk} ${debug_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo2-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -18,6 +18,9 @@ define pacemaker::stonith::fence_ilo3 (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$auth_chunk = $auth ? {
undef => "",
@@ -93,10 +96,14 @@ define pacemaker::stonith::fence_ilo3 (
exec { "Create stonith-fence_ilo3-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ilo3-${safe_title} fence_ilo3 pcmk_host_list=\"${pcmk_host_value_chunk}\" ${auth_chunk} ${ipaddr_chunk} ${passwd_chunk} ${passwd_script_chunk} ${lanplus_chunk} ${login_chunk} ${timeout_chunk} ${cipher_chunk} ${method_chunk} ${power_wait_chunk} ${delay_chunk} ${privlvl_chunk} ${verbose_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo3-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -18,6 +18,9 @@ define pacemaker::stonith::fence_ilo4 (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$auth_chunk = $auth ? {
undef => "",
@@ -93,10 +96,14 @@ define pacemaker::stonith::fence_ilo4 (
exec { "Create stonith-fence_ilo4-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ilo4-${safe_title} fence_ilo4 pcmk_host_list=\"${pcmk_host_value_chunk}\" ${auth_chunk} ${ipaddr_chunk} ${passwd_chunk} ${passwd_script_chunk} ${lanplus_chunk} ${login_chunk} ${timeout_chunk} ${cipher_chunk} ${method_chunk} ${power_wait_chunk} ${delay_chunk} ${privlvl_chunk} ${verbose_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo4-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -24,6 +24,9 @@ define pacemaker::stonith::fence_ilo_mp (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -123,10 +126,14 @@ define pacemaker::stonith::fence_ilo_mp (
exec { "Create stonith-fence_ilo_mp-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ilo_mp-${safe_title} fence_ilo_mp pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${secure_chunk} ${cmd_prompt_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ilo_mp-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -18,6 +18,9 @@ define pacemaker::stonith::fence_imm (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$auth_chunk = $auth ? {
undef => "",
@@ -93,10 +96,14 @@ define pacemaker::stonith::fence_imm (
exec { "Create stonith-fence_imm-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_imm-${safe_title} fence_imm pcmk_host_list=\"${pcmk_host_value_chunk}\" ${auth_chunk} ${ipaddr_chunk} ${passwd_chunk} ${passwd_script_chunk} ${lanplus_chunk} ${login_chunk} ${timeout_chunk} ${cipher_chunk} ${method_chunk} ${power_wait_chunk} ${delay_chunk} ${privlvl_chunk} ${verbose_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_imm-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_intelmodular (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_intelmodular (
exec { "Create stonith-fence_intelmodular-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_intelmodular-${safe_title} fence_intelmodular pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_intelmodular-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -29,6 +29,9 @@ define pacemaker::stonith::fence_ipdu (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -148,10 +151,14 @@ define pacemaker::stonith::fence_ipdu (
exec { "Create stonith-fence_ipdu-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ipdu-${safe_title} fence_ipdu pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${port_chunk} ${snmp_version_chunk} ${community_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${snmp_auth_prot_chunk} ${snmp_sec_level_chunk} ${snmp_priv_prot_chunk} ${snmp_priv_passwd_chunk} ${snmp_priv_passwd_script_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ipdu-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -18,6 +18,9 @@ define pacemaker::stonith::fence_ipmilan (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$auth_chunk = $auth ? {
undef => "",
@@ -93,10 +96,14 @@ define pacemaker::stonith::fence_ipmilan (
exec { "Create stonith-fence_ipmilan-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_ipmilan-${safe_title} fence_ipmilan pcmk_host_list=\"${pcmk_host_value_chunk}\" ${auth_chunk} ${ipaddr_chunk} ${passwd_chunk} ${passwd_script_chunk} ${lanplus_chunk} ${login_chunk} ${timeout_chunk} ${cipher_chunk} ${method_chunk} ${power_wait_chunk} ${delay_chunk} ${privlvl_chunk} ${verbose_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_ipmilan-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -11,6 +11,9 @@ define pacemaker::stonith::fence_kdump (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$nodename_chunk = $nodename ? {
undef => "",
@@ -58,10 +61,14 @@ define pacemaker::stonith::fence_kdump (
exec { "Create stonith-fence_kdump-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_kdump-${safe_title} fence_kdump pcmk_host_list=\"${pcmk_host_value_chunk}\" ${nodename_chunk} ${ipport_chunk} ${family_chunk} ${timeout_chunk} ${verbose_chunk} ${usage_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_kdump-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -26,6 +26,9 @@ define pacemaker::stonith::fence_rhevm (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -133,10 +136,14 @@ define pacemaker::stonith::fence_rhevm (
exec { "Create stonith-fence_rhevm-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_rhevm-${safe_title} fence_rhevm pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${ssl_chunk} ${notls_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${ssl_secure_chunk} ${ssl_insecure_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_rhevm-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -24,6 +24,9 @@ define pacemaker::stonith::fence_rsb (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -123,10 +126,14 @@ define pacemaker::stonith::fence_rsb (
exec { "Create stonith-fence_rsb-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_rsb-${safe_title} fence_rsb pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${secure_chunk} ${cmd_prompt_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_rsb-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -11,6 +11,9 @@ define pacemaker::stonith::fence_scsi (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$aptpl_chunk = $aptpl ? {
undef => "",
@@ -58,10 +61,14 @@ define pacemaker::stonith::fence_scsi (
exec { "Create stonith-fence_scsi-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_scsi-${safe_title} fence_scsi pcmk_host_list=\"${pcmk_host_value_chunk}\" ${aptpl_chunk} ${devices_chunk} ${logfile_chunk} ${delay_chunk} ${key_chunk} ${nodename_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_scsi-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -14,6 +14,9 @@ define pacemaker::stonith::fence_virt (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$debug_chunk = $debug ? {
undef => "",
@@ -73,10 +76,14 @@ define pacemaker::stonith::fence_virt (
exec { "Create stonith-fence_virt-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_virt-${safe_title} fence_virt pcmk_host_list=\"${pcmk_host_value_chunk}\" ${debug_chunk} ${serial_device_chunk} ${serial_params_chunk} ${channel_address_chunk} ${ipport_chunk} ${port_chunk} ${timeout_chunk} ${delay_chunk} ${domain_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_virt-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -26,6 +26,9 @@ define pacemaker::stonith::fence_vmware_soap (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -133,10 +136,14 @@ define pacemaker::stonith::fence_vmware_soap (
exec { "Create stonith-fence_vmware_soap-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_vmware_soap-${safe_title} fence_vmware_soap pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${ssl_chunk} ${notls_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${ssl_secure_chunk} ${ssl_insecure_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_vmware_soap-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -26,6 +26,9 @@ define pacemaker::stonith::fence_wti (
$interval = "60s",
$ensure = present,
$pcmk_host_list = undef,
$tries = undef,
$try_sleep = undef,
) {
$ipaddr_chunk = $ipaddr ? {
undef => "",
@@ -133,10 +136,14 @@ define pacemaker::stonith::fence_wti (
exec { "Create stonith-fence_wti-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_wti-${safe_title} fence_wti pcmk_host_list=\"${pcmk_host_value_chunk}\" ${ipaddr_chunk} ${login_chunk} ${passwd_chunk} ${cmd_prompt_chunk} ${secure_chunk} ${port_chunk} ${ipport_chunk} ${inet4_only_chunk} ${inet6_only_chunk} ${passwd_script_chunk} ${identity_file_chunk} ${ssh_options_chunk} ${verbose_chunk} ${debug_chunk} ${separator_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${login_timeout_chunk} ${power_wait_chunk} ${delay_chunk} ${retry_on_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_wti-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}

View File

@@ -21,6 +21,9 @@ define pacemaker::stonith::fence_xvm (
$key_file = "/etc/cluster/fence_xvm.key",
$key_file_password = "123456",
$manage_fw = true,
$tries = undef,
$try_sleep = undef,
) {
$debug_chunk = $debug ? {
undef => "",
@@ -118,10 +121,14 @@ define pacemaker::stonith::fence_xvm (
exec { "Create stonith-fence_xvm-${safe_title}":
command => "/usr/sbin/pcs stonith create stonith-fence_xvm-${safe_title} fence_xvm pcmk_host_list=\"${pcmk_host_value_chunk}\" ${debug_chunk} ${ip_family_chunk} ${multicast_address_chunk} ${ipport_chunk} ${retrans_chunk} ${auth_chunk} ${hash_chunk} ${key_file_chunk} ${port_chunk} ${use_uuid_chunk} ${timeout_chunk} ${delay_chunk} ${domain_chunk} op monitor interval=${interval}",
unless => "/usr/sbin/pcs stonith show stonith-fence_xvm-${safe_title} > /dev/null 2>&1",
tries => $tries,
try_sleep => $try_sleep,
require => Class["pacemaker::corosync"],
} ->
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}",
tries => $tries,
try_sleep => $try_sleep,
}
}
}