From f62e67f3b48857822ab214bbf2bb704b18ce34af Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Fri, 12 Jun 2015 18:31:51 +0200 Subject: [PATCH] Add retry logic into fence agent manifests --- agent_generator/agent_generator.rb | 11 +++++++++-- manifests/stonith/fence_apc.pp | 9 ++++++++- manifests/stonith/fence_apc_snmp.pp | 9 ++++++++- manifests/stonith/fence_bladecenter.pp | 9 ++++++++- manifests/stonith/fence_brocade.pp | 9 ++++++++- manifests/stonith/fence_cisco_mds.pp | 9 ++++++++- manifests/stonith/fence_cisco_ucs.pp | 9 ++++++++- manifests/stonith/fence_drac5.pp | 9 ++++++++- manifests/stonith/fence_eaton_snmp.pp | 9 ++++++++- manifests/stonith/fence_eps.pp | 9 ++++++++- manifests/stonith/fence_hpblade.pp | 9 ++++++++- manifests/stonith/fence_ibmblade.pp | 9 ++++++++- manifests/stonith/fence_idrac.pp | 9 ++++++++- manifests/stonith/fence_ifmib.pp | 9 ++++++++- manifests/stonith/fence_ilo.pp | 9 ++++++++- manifests/stonith/fence_ilo2.pp | 9 ++++++++- manifests/stonith/fence_ilo3.pp | 9 ++++++++- manifests/stonith/fence_ilo4.pp | 9 ++++++++- manifests/stonith/fence_ilo_mp.pp | 9 ++++++++- manifests/stonith/fence_imm.pp | 9 ++++++++- manifests/stonith/fence_intelmodular.pp | 9 ++++++++- manifests/stonith/fence_ipdu.pp | 9 ++++++++- manifests/stonith/fence_ipmilan.pp | 9 ++++++++- manifests/stonith/fence_kdump.pp | 9 ++++++++- manifests/stonith/fence_rhevm.pp | 9 ++++++++- manifests/stonith/fence_rsb.pp | 9 ++++++++- manifests/stonith/fence_scsi.pp | 9 ++++++++- manifests/stonith/fence_virt.pp | 9 ++++++++- manifests/stonith/fence_vmware_soap.pp | 9 ++++++++- manifests/stonith/fence_wti.pp | 9 ++++++++- manifests/stonith/fence_xvm.pp | 9 ++++++++- 31 files changed, 249 insertions(+), 32 deletions(-) diff --git a/agent_generator/agent_generator.rb b/agent_generator/agent_generator.rb index 5ecc3a32..f3c5b536 100755 --- a/agent_generator/agent_generator.rb +++ b/agent_generator/agent_generator.rb @@ -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 diff --git a/manifests/stonith/fence_apc.pp b/manifests/stonith/fence_apc.pp index 28faae33..8229e693 100644 --- a/manifests/stonith/fence_apc.pp +++ b/manifests/stonith/fence_apc.pp @@ -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, } } } diff --git a/manifests/stonith/fence_apc_snmp.pp b/manifests/stonith/fence_apc_snmp.pp index 42f6b9e8..959519e1 100644 --- a/manifests/stonith/fence_apc_snmp.pp +++ b/manifests/stonith/fence_apc_snmp.pp @@ -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, } } } diff --git a/manifests/stonith/fence_bladecenter.pp b/manifests/stonith/fence_bladecenter.pp index 4f655f43..415b5cc5 100644 --- a/manifests/stonith/fence_bladecenter.pp +++ b/manifests/stonith/fence_bladecenter.pp @@ -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, } } } diff --git a/manifests/stonith/fence_brocade.pp b/manifests/stonith/fence_brocade.pp index a5024bd5..b30b70b5 100644 --- a/manifests/stonith/fence_brocade.pp +++ b/manifests/stonith/fence_brocade.pp @@ -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, } } } diff --git a/manifests/stonith/fence_cisco_mds.pp b/manifests/stonith/fence_cisco_mds.pp index e83de09a..a914bbd6 100644 --- a/manifests/stonith/fence_cisco_mds.pp +++ b/manifests/stonith/fence_cisco_mds.pp @@ -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, } } } diff --git a/manifests/stonith/fence_cisco_ucs.pp b/manifests/stonith/fence_cisco_ucs.pp index 868bcef5..cff71744 100644 --- a/manifests/stonith/fence_cisco_ucs.pp +++ b/manifests/stonith/fence_cisco_ucs.pp @@ -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, } } } diff --git a/manifests/stonith/fence_drac5.pp b/manifests/stonith/fence_drac5.pp index 966f0232..8fdf9e7f 100644 --- a/manifests/stonith/fence_drac5.pp +++ b/manifests/stonith/fence_drac5.pp @@ -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, } } } diff --git a/manifests/stonith/fence_eaton_snmp.pp b/manifests/stonith/fence_eaton_snmp.pp index 1eff9061..036e9755 100644 --- a/manifests/stonith/fence_eaton_snmp.pp +++ b/manifests/stonith/fence_eaton_snmp.pp @@ -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, } } } diff --git a/manifests/stonith/fence_eps.pp b/manifests/stonith/fence_eps.pp index 7bb6e240..aea36acc 100644 --- a/manifests/stonith/fence_eps.pp +++ b/manifests/stonith/fence_eps.pp @@ -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, } } } diff --git a/manifests/stonith/fence_hpblade.pp b/manifests/stonith/fence_hpblade.pp index f4a712bc..4eef367d 100644 --- a/manifests/stonith/fence_hpblade.pp +++ b/manifests/stonith/fence_hpblade.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ibmblade.pp b/manifests/stonith/fence_ibmblade.pp index ca52811f..13dfe31d 100644 --- a/manifests/stonith/fence_ibmblade.pp +++ b/manifests/stonith/fence_ibmblade.pp @@ -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, } } } diff --git a/manifests/stonith/fence_idrac.pp b/manifests/stonith/fence_idrac.pp index 28b35ae9..438c8a84 100644 --- a/manifests/stonith/fence_idrac.pp +++ b/manifests/stonith/fence_idrac.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ifmib.pp b/manifests/stonith/fence_ifmib.pp index b8404a20..a2185bc2 100644 --- a/manifests/stonith/fence_ifmib.pp +++ b/manifests/stonith/fence_ifmib.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ilo.pp b/manifests/stonith/fence_ilo.pp index e628bed1..db495c17 100644 --- a/manifests/stonith/fence_ilo.pp +++ b/manifests/stonith/fence_ilo.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ilo2.pp b/manifests/stonith/fence_ilo2.pp index 58b9ad29..644bd077 100644 --- a/manifests/stonith/fence_ilo2.pp +++ b/manifests/stonith/fence_ilo2.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ilo3.pp b/manifests/stonith/fence_ilo3.pp index 59d542b0..b6da79e3 100644 --- a/manifests/stonith/fence_ilo3.pp +++ b/manifests/stonith/fence_ilo3.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ilo4.pp b/manifests/stonith/fence_ilo4.pp index b289d047..714b3cf1 100644 --- a/manifests/stonith/fence_ilo4.pp +++ b/manifests/stonith/fence_ilo4.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ilo_mp.pp b/manifests/stonith/fence_ilo_mp.pp index 91af32f2..6b8e30d1 100644 --- a/manifests/stonith/fence_ilo_mp.pp +++ b/manifests/stonith/fence_ilo_mp.pp @@ -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, } } } diff --git a/manifests/stonith/fence_imm.pp b/manifests/stonith/fence_imm.pp index 146cfc53..d4534b4e 100644 --- a/manifests/stonith/fence_imm.pp +++ b/manifests/stonith/fence_imm.pp @@ -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, } } } diff --git a/manifests/stonith/fence_intelmodular.pp b/manifests/stonith/fence_intelmodular.pp index 989af7bf..b93a5f40 100644 --- a/manifests/stonith/fence_intelmodular.pp +++ b/manifests/stonith/fence_intelmodular.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ipdu.pp b/manifests/stonith/fence_ipdu.pp index 0e183988..53aa32a8 100644 --- a/manifests/stonith/fence_ipdu.pp +++ b/manifests/stonith/fence_ipdu.pp @@ -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, } } } diff --git a/manifests/stonith/fence_ipmilan.pp b/manifests/stonith/fence_ipmilan.pp index bb421ce5..6183519d 100644 --- a/manifests/stonith/fence_ipmilan.pp +++ b/manifests/stonith/fence_ipmilan.pp @@ -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, } } } diff --git a/manifests/stonith/fence_kdump.pp b/manifests/stonith/fence_kdump.pp index e98bba31..4d893642 100644 --- a/manifests/stonith/fence_kdump.pp +++ b/manifests/stonith/fence_kdump.pp @@ -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, } } } diff --git a/manifests/stonith/fence_rhevm.pp b/manifests/stonith/fence_rhevm.pp index ce6d6cc9..669fa1db 100644 --- a/manifests/stonith/fence_rhevm.pp +++ b/manifests/stonith/fence_rhevm.pp @@ -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, } } } diff --git a/manifests/stonith/fence_rsb.pp b/manifests/stonith/fence_rsb.pp index 1ec080d6..0ff8475a 100644 --- a/manifests/stonith/fence_rsb.pp +++ b/manifests/stonith/fence_rsb.pp @@ -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, } } } diff --git a/manifests/stonith/fence_scsi.pp b/manifests/stonith/fence_scsi.pp index bdbd6347..3031da94 100644 --- a/manifests/stonith/fence_scsi.pp +++ b/manifests/stonith/fence_scsi.pp @@ -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, } } } diff --git a/manifests/stonith/fence_virt.pp b/manifests/stonith/fence_virt.pp index 4cd13641..ef9c3b2f 100644 --- a/manifests/stonith/fence_virt.pp +++ b/manifests/stonith/fence_virt.pp @@ -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, } } } diff --git a/manifests/stonith/fence_vmware_soap.pp b/manifests/stonith/fence_vmware_soap.pp index 742b81e0..e5021169 100644 --- a/manifests/stonith/fence_vmware_soap.pp +++ b/manifests/stonith/fence_vmware_soap.pp @@ -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, } } } diff --git a/manifests/stonith/fence_wti.pp b/manifests/stonith/fence_wti.pp index 9e77e3e0..1cfb2175 100644 --- a/manifests/stonith/fence_wti.pp +++ b/manifests/stonith/fence_wti.pp @@ -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, } } } diff --git a/manifests/stonith/fence_xvm.pp b/manifests/stonith/fence_xvm.pp index e82c134d..cba974c7 100644 --- a/manifests/stonith/fence_xvm.pp +++ b/manifests/stonith/fence_xvm.pp @@ -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, } } }