diff --git a/agent_generator/agent_generator.rb b/agent_generator/agent_generator.rb
index b44ca971..fc182322 100755
--- a/agent_generator/agent_generator.rb
+++ b/agent_generator/agent_generator.rb
@@ -85,6 +85,18 @@ class ManifestGenerator
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -110,6 +122,8 @@ class ManifestGenerator
#
define pacemaker::stonith::#{@parser.getAgentName} (
#{getManifestParameters}
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
#{getVariableValues}
$pcmk_host_value_chunk = $pcmk_host_list ? {
@@ -131,12 +145,14 @@ define pacemaker::stonith::#{@parser.getAgentName} (
#{getPackageSnippet}
pcmk_stonith { "stonith-#{@parser.getAgentName}-${safe_title}":
- ensure => $ensure,
- stonith_type => '#{@parser.getAgentName}',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => '#{@parser.getAgentName}',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
eos
diff --git a/bindep.txt b/bindep.txt
index 17bc5314..3048d541 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -13,4 +13,8 @@ pacemaker-cli-utils [test platform:dpkg]
pacemaker-cli [test platform:rpm]
pcs [test platform:rpm]
pcs [test platform:dpkg]
+fence-agents-all [test platform:rpm]
+fence-agents [test platform:dpkg]
+pacemaker [test platform:rpm]
+pacemaker [test platform:dpkg]
puppet [build]
diff --git a/lib/puppet/provider/pcmk_stonith/default.rb b/lib/puppet/provider/pcmk_stonith/default.rb
index 58a65a6a..cf5b2e99 100644
--- a/lib/puppet/provider/pcmk_stonith/default.rb
+++ b/lib/puppet/provider/pcmk_stonith/default.rb
@@ -3,37 +3,75 @@ require_relative '../pcmk_common'
Puppet::Type.type(:pcmk_stonith).provide(:default) do
desc 'A base resource definition for a pacemaker stonith'
- ### overloaded methods
- def create
+ def initialize(*args)
+ super(*args)
+ Puppet.debug("puppet-pacemaker: initialize()")
+ # Hash to store the existance state of each resource or location
+ @resources_state = {}
+ @locations_state = {}
+ end
+
+ def build_pcs_resource_cmd(update=false)
+
name = @resource[:name]
stonith_type = @resource[:stonith_type]
pcmk_host_list = @resource[:pcmk_host_list]
pcs_param_string = @resource[:pcs_param_string]
- # We need to probe the existance of both location and resource
- # because we do not know why we're being created (if for both or
- # only for one)
- did_stonith_location_exist = stonith_location_exists?
- did_stonith_resource_exist = stonith_resource_exists?
- Puppet.debug("Create: stonith exists #{did_stonith_resource_exist} location exists #{did_stonith_location_exist}")
- cmd = 'stonith create ' + name + ' ' + stonith_type + ' '
+ if update
+ create_cmd = ' update '
+ else
+ create_cmd = ' create '
+ end
+
+ cmd = 'stonith' + create_cmd + name + ' ' + stonith_type + ' '
if not_empty_string(pcmk_host_list)
cmd += 'pcmk_host_list=' + pcmk_host_list + ' '
end
cmd += @resource[:pcs_param_string]
+ end
+
+ def create_resource_and_location(location_rule=false, needs_update=false)
+ if needs_update then
+ cmd = build_pcs_resource_cmd(update=true)
+ pcs('update', name, cmd, @resource[:tries],
+ @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ else
+ cmd = build_pcs_resource_cmd()
+ if location_rule then
+ pcs('create', name, "#{cmd} --disabled", @resource[:tries],
+ @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ stonith_location_rule_create()
+ pcs('create', name, "resource enable #{name}", @resource[:tries],
+ @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ else
+ pcs('create', name, cmd, @resource[:tries],
+ @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ end
+ end
+ end
+
+
+ def create
+
+ # We need to probe the existance of both location and resource
+ # because we do not know why we're being created (if for both or
+ # only for one)
+ did_stonith_resource_exist = @resources_state[@resource[:name]] == PCMK_NOCHANGENEEDED
+ did_stonith_location_exist = @locations_state[@resource[:name]] == PCMK_NOCHANGENEEDED
+
+ Puppet.debug("Create: stonith exists #{did_stonith_resource_exist} location exists #{did_stonith_location_exist}")
+
+ needs_update = @resources_state[@resource[:name]] == PCMK_CHANGENEEDED
+
# If both the stonith resource and the location do not exist, we create them both
# if a location_rule is specified otherwise only the resource
if not did_stonith_location_exist and not did_stonith_resource_exist
- pcs('create', name, "#{cmd} --disabled", @resource[:tries],
- @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
- stonith_location_rule_create()
- pcs('create', name, "resource enable #{name}", @resource[:tries],
- @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ create_resource_and_location(true, needs_update)
# If the location_rule already existed, we only create the resource
elsif did_stonith_location_exist and not did_stonith_resource_exist
- pcs('create', name, cmd, @resource[:tries],
- @resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
+ create_resource_and_location(false, needs_update)
# The location_rule does not exist and the resource does exist
elsif not did_stonith_location_exist and did_stonith_resource_exist
stonith_location_rule_create()
@@ -52,8 +90,11 @@ Puppet::Type.type(:pcmk_stonith).provide(:default) do
end
def exists?
- did_stonith_location_exist = stonith_location_exists?
- did_stonith_resource_exist = stonith_resource_exists?
+ @locations_state[@resource[:name]] = stonith_location_exists?
+ @resources_state[@resource[:name]] = stonith_resource_exists?
+ did_stonith_resource_exist = @resources_state[@resource[:name]] == PCMK_NOCHANGENEEDED
+ did_stonith_location_exist = @locations_state[@resource[:name]] == PCMK_NOCHANGENEEDED
+
Puppet.debug("Exists: stonith resource exists #{did_stonith_resource_exist} location exists #{did_stonith_location_exist}")
if did_stonith_resource_exist and did_stonith_location_exist
return true
@@ -65,7 +106,13 @@ Puppet::Type.type(:pcmk_stonith).provide(:default) do
cmd = 'stonith show ' + @resource[:name] + ' > /dev/null 2>&1'
ret = pcs('show', @resource[:name], cmd, @resource[:tries],
@resource[:try_sleep], @resource[:verify_on_create], @resource[:post_success_sleep])
- return ret == false ? false : true
+ if ret == false then
+ return PCMK_NOTEXISTS
+ end
+ if @resource[:deep_compare] and pcmk_resource_has_changed?(@resource, build_pcs_resource_cmd(update=true), '') then
+ return PCMK_CHANGENEEDED
+ end
+ return PCMK_NOCHANGENEEDED
end
def stonith_location_exists?
diff --git a/lib/puppet/type/pcmk_stonith.rb b/lib/puppet/type/pcmk_stonith.rb
index b96e4d31..3f1db356 100644
--- a/lib/puppet/type/pcmk_stonith.rb
+++ b/lib/puppet/type/pcmk_stonith.rb
@@ -22,6 +22,33 @@ Puppet::Type.newtype(:pcmk_stonith) do
desc "The pacemaker pcs string to use."
end
+ newparam(:deep_compare, :boolean => true, :parent => Puppet::Parameter::Boolean) do
+ desc "Whether to enable deep comparing of resource
+ When set to true a resource will be compared in full (options, meta parameters,..)
+ to the existing one and in case of difference it will be repushed to the CIB
+ Defaults to `false`."
+
+ defaultto false
+ end
+
+ newparam(:update_settle_secs) do
+ desc "The time in seconds to wait for the cluster to settle after resource has been updated
+ when :deep_compare kicked in. Defaults to '600'."
+
+ munge do |value|
+ if value.is_a?(String)
+ unless value =~ /^[-\d.]+$/
+ raise ArgumentError, "update_settle_secs must be a number"
+ end
+ value = Float(value)
+ end
+ raise ArgumentError, "update_settle_secs cannot be a negative number" if value < 0
+ value
+ end
+
+ defaultto 600
+ end
+
## borrowed from exec.rb
newparam(:tries) do
desc "The number of times to attempt to create a pcs resource.
diff --git a/manifests/stonith/fence_amt.pp b/manifests/stonith/fence_amt.pp
index 9f89242a..7d3402ef 100644
--- a/manifests/stonith/fence_amt.pp
+++ b/manifests/stonith/fence_amt.pp
@@ -107,6 +107,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -167,6 +179,8 @@ define pacemaker::stonith::fence_amt (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipport_chunk = $ipport ? {
undef => '',
@@ -296,11 +310,13 @@ define pacemaker::stonith::fence_amt (
pcmk_stonith { "stonith-fence_amt-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_amt',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_amt',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_apc.pp b/manifests/stonith/fence_apc.pp
index 83cf60d4..6eda9caa 100644
--- a/manifests/stonith/fence_apc.pp
+++ b/manifests/stonith/fence_apc.pp
@@ -95,6 +95,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -151,6 +163,8 @@ define pacemaker::stonith::fence_apc (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -267,11 +281,13 @@ define pacemaker::stonith::fence_apc (
Package['fence-agents-apc'] -> Pcmk_stonith["stonith-fence_apc-${safe_title}"]
}
pcmk_stonith { "stonith-fence_apc-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_apc',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_apc',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_apc_snmp.pp b/manifests/stonith/fence_apc_snmp.pp
index 673a8799..08476a09 100644
--- a/manifests/stonith/fence_apc_snmp.pp
+++ b/manifests/stonith/fence_apc_snmp.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_apc_snmp (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_apc_snmp (
Package['fence-agents-apc-snmp'] -> Pcmk_stonith["stonith-fence_apc_snmp-${safe_title}"]
}
pcmk_stonith { "stonith-fence_apc_snmp-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_apc_snmp',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_apc_snmp',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_bladecenter.pp b/manifests/stonith/fence_bladecenter.pp
index a8c601fc..e47fac57 100644
--- a/manifests/stonith/fence_bladecenter.pp
+++ b/manifests/stonith/fence_bladecenter.pp
@@ -95,6 +95,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -151,6 +163,8 @@ define pacemaker::stonith::fence_bladecenter (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -267,11 +281,13 @@ define pacemaker::stonith::fence_bladecenter (
Package['fence-agents-bladecenter'] -> Pcmk_stonith["stonith-fence_bladecenter-${safe_title}"]
}
pcmk_stonith { "stonith-fence_bladecenter-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_bladecenter',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_bladecenter',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_brocade.pp b/manifests/stonith/fence_brocade.pp
index a90f3918..7d1deae0 100644
--- a/manifests/stonith/fence_brocade.pp
+++ b/manifests/stonith/fence_brocade.pp
@@ -92,6 +92,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -147,6 +159,8 @@ define pacemaker::stonith::fence_brocade (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -259,11 +273,13 @@ define pacemaker::stonith::fence_brocade (
Package['fence-agents-brocade'] -> Pcmk_stonith["stonith-fence_brocade-${safe_title}"]
}
pcmk_stonith { "stonith-fence_brocade-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_brocade',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_brocade',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_cisco_mds.pp b/manifests/stonith/fence_cisco_mds.pp
index a143ed32..7151add6 100644
--- a/manifests/stonith/fence_cisco_mds.pp
+++ b/manifests/stonith/fence_cisco_mds.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_cisco_mds (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_cisco_mds (
Package['fence-agents-cisco-mds'] -> Pcmk_stonith["stonith-fence_cisco_mds-${safe_title}"]
}
pcmk_stonith { "stonith-fence_cisco_mds-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_cisco_mds',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_cisco_mds',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_cisco_ucs.pp b/manifests/stonith/fence_cisco_ucs.pp
index 83157473..57e4c86c 100644
--- a/manifests/stonith/fence_cisco_ucs.pp
+++ b/manifests/stonith/fence_cisco_ucs.pp
@@ -95,6 +95,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -151,6 +163,8 @@ define pacemaker::stonith::fence_cisco_ucs (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -267,11 +281,13 @@ define pacemaker::stonith::fence_cisco_ucs (
Package['fence-agents-cisco-ucs'] -> Pcmk_stonith["stonith-fence_cisco_ucs-${safe_title}"]
}
pcmk_stonith { "stonith-fence_cisco_ucs-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_cisco_ucs',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_cisco_ucs',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_compute.pp b/manifests/stonith/fence_compute.pp
index d86ac3f0..0e20536e 100644
--- a/manifests/stonith/fence_compute.pp
+++ b/manifests/stonith/fence_compute.pp
@@ -116,6 +116,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -179,6 +191,8 @@ define pacemaker::stonith::fence_compute (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$tenant_name_chunk = $tenant_name ? {
undef => '',
@@ -323,11 +337,13 @@ define pacemaker::stonith::fence_compute (
Package['fence-agents-compute'] -> Pcmk_stonith["stonith-fence_compute-${safe_title}"]
}
pcmk_stonith { "stonith-fence_compute-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_compute',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_compute',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_drac5.pp b/manifests/stonith/fence_drac5.pp
index db1dd69b..c2d8757a 100644
--- a/manifests/stonith/fence_drac5.pp
+++ b/manifests/stonith/fence_drac5.pp
@@ -95,6 +95,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -151,6 +163,8 @@ define pacemaker::stonith::fence_drac5 (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -267,11 +281,13 @@ define pacemaker::stonith::fence_drac5 (
Package['fence-agents-drac5'] -> Pcmk_stonith["stonith-fence_drac5-${safe_title}"]
}
pcmk_stonith { "stonith-fence_drac5-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_drac5',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_drac5',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_eaton_snmp.pp b/manifests/stonith/fence_eaton_snmp.pp
index a483b8e4..7ae6f4f6 100644
--- a/manifests/stonith/fence_eaton_snmp.pp
+++ b/manifests/stonith/fence_eaton_snmp.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_eaton_snmp (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_eaton_snmp (
Package['fence-agents-eaton-snmp'] -> Pcmk_stonith["stonith-fence_eaton_snmp-${safe_title}"]
}
pcmk_stonith { "stonith-fence_eaton_snmp-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_eaton_snmp',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_eaton_snmp',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_eps.pp b/manifests/stonith/fence_eps.pp
index 4dbaa49d..40281fde 100644
--- a/manifests/stonith/fence_eps.pp
+++ b/manifests/stonith/fence_eps.pp
@@ -83,6 +83,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -135,6 +147,8 @@ define pacemaker::stonith::fence_eps (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -235,11 +249,13 @@ define pacemaker::stonith::fence_eps (
Package['fence-agents-eps'] -> Pcmk_stonith["stonith-fence_eps-${safe_title}"]
}
pcmk_stonith { "stonith-fence_eps-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_eps',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_eps',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_hpblade.pp b/manifests/stonith/fence_hpblade.pp
index 867a435b..46c32765 100644
--- a/manifests/stonith/fence_hpblade.pp
+++ b/manifests/stonith/fence_hpblade.pp
@@ -95,6 +95,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -151,6 +163,8 @@ define pacemaker::stonith::fence_hpblade (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -267,11 +281,13 @@ define pacemaker::stonith::fence_hpblade (
Package['fence-agents-hpblade'] -> Pcmk_stonith["stonith-fence_hpblade-${safe_title}"]
}
pcmk_stonith { "stonith-fence_hpblade-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_hpblade',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_hpblade',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ibmblade.pp b/manifests/stonith/fence_ibmblade.pp
index c058d052..e8debac6 100644
--- a/manifests/stonith/fence_ibmblade.pp
+++ b/manifests/stonith/fence_ibmblade.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_ibmblade (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_ibmblade (
Package['fence-agents-ibmblade'] -> Pcmk_stonith["stonith-fence_ibmblade-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ibmblade-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ibmblade',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ibmblade',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_idrac.pp b/manifests/stonith/fence_idrac.pp
index f7be6a46..41a57e1c 100644
--- a/manifests/stonith/fence_idrac.pp
+++ b/manifests/stonith/fence_idrac.pp
@@ -68,6 +68,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -115,6 +127,8 @@ define pacemaker::stonith::fence_idrac (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$auth_chunk = $auth ? {
undef => '',
@@ -195,11 +209,13 @@ define pacemaker::stonith::fence_idrac (
Package['fence-agents-ipmilan'] -> Pcmk_stonith["stonith-fence_idrac-${safe_title}"]
}
pcmk_stonith { "stonith-fence_idrac-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_idrac',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_idrac',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ifmib.pp b/manifests/stonith/fence_ifmib.pp
index 7621d4da..d6bed455 100644
--- a/manifests/stonith/fence_ifmib.pp
+++ b/manifests/stonith/fence_ifmib.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_ifmib (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_ifmib (
Package['fence-agents-ifmib'] -> Pcmk_stonith["stonith-fence_ifmib-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ifmib-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ifmib',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ifmib',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ilo.pp b/manifests/stonith/fence_ilo.pp
index cacc7a76..5977f506 100644
--- a/manifests/stonith/fence_ilo.pp
+++ b/manifests/stonith/fence_ilo.pp
@@ -89,6 +89,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -143,6 +155,8 @@ define pacemaker::stonith::fence_ilo (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -251,11 +265,13 @@ define pacemaker::stonith::fence_ilo (
Package['fence-agents-ilo2'] -> Pcmk_stonith["stonith-fence_ilo-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ilo-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ilo',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ilo',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ilo2.pp b/manifests/stonith/fence_ilo2.pp
index 80a5dde0..4004b7e6 100644
--- a/manifests/stonith/fence_ilo2.pp
+++ b/manifests/stonith/fence_ilo2.pp
@@ -89,6 +89,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -143,6 +155,8 @@ define pacemaker::stonith::fence_ilo2 (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -251,11 +265,13 @@ define pacemaker::stonith::fence_ilo2 (
Package['fence-agents-ilo2'] -> Pcmk_stonith["stonith-fence_ilo2-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ilo2-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ilo2',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ilo2',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ilo3.pp b/manifests/stonith/fence_ilo3.pp
index 6312c77b..8b44b922 100644
--- a/manifests/stonith/fence_ilo3.pp
+++ b/manifests/stonith/fence_ilo3.pp
@@ -68,6 +68,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -115,6 +127,8 @@ define pacemaker::stonith::fence_ilo3 (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$auth_chunk = $auth ? {
undef => '',
@@ -195,11 +209,13 @@ define pacemaker::stonith::fence_ilo3 (
Package['fence-agents-ipmilan'] -> Pcmk_stonith["stonith-fence_ilo3-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ilo3-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ilo3',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ilo3',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ilo4.pp b/manifests/stonith/fence_ilo4.pp
index 0cfb5686..456fc7a7 100644
--- a/manifests/stonith/fence_ilo4.pp
+++ b/manifests/stonith/fence_ilo4.pp
@@ -68,6 +68,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -115,6 +127,8 @@ define pacemaker::stonith::fence_ilo4 (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$auth_chunk = $auth ? {
undef => '',
@@ -195,11 +209,13 @@ define pacemaker::stonith::fence_ilo4 (
Package['fence-agents-ipmilan'] -> Pcmk_stonith["stonith-fence_ilo4-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ilo4-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ilo4',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ilo4',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ilo_mp.pp b/manifests/stonith/fence_ilo_mp.pp
index 4e201be6..2279a714 100644
--- a/manifests/stonith/fence_ilo_mp.pp
+++ b/manifests/stonith/fence_ilo_mp.pp
@@ -86,6 +86,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -139,6 +151,8 @@ define pacemaker::stonith::fence_ilo_mp (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -243,11 +257,13 @@ define pacemaker::stonith::fence_ilo_mp (
Package['fence-agents-ilo-mp'] -> Pcmk_stonith["stonith-fence_ilo_mp-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ilo_mp-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ilo_mp',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ilo_mp',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_imm.pp b/manifests/stonith/fence_imm.pp
index 54b02a87..8598d557 100644
--- a/manifests/stonith/fence_imm.pp
+++ b/manifests/stonith/fence_imm.pp
@@ -68,6 +68,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -115,6 +127,8 @@ define pacemaker::stonith::fence_imm (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$auth_chunk = $auth ? {
undef => '',
@@ -195,11 +209,13 @@ define pacemaker::stonith::fence_imm (
Package['fence-agents-ipmilan'] -> Pcmk_stonith["stonith-fence_imm-${safe_title}"]
}
pcmk_stonith { "stonith-fence_imm-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_imm',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_imm',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_intelmodular.pp b/manifests/stonith/fence_intelmodular.pp
index 8e2a4e10..7ad265c0 100644
--- a/manifests/stonith/fence_intelmodular.pp
+++ b/manifests/stonith/fence_intelmodular.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_intelmodular (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_intelmodular (
Package['fence-agents-intelmodular'] -> Pcmk_stonith["stonith-fence_intelmodular-${safe_title}"]
}
pcmk_stonith { "stonith-fence_intelmodular-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_intelmodular',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_intelmodular',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ipdu.pp b/manifests/stonith/fence_ipdu.pp
index f1ad8bf6..d7056eb9 100644
--- a/manifests/stonith/fence_ipdu.pp
+++ b/manifests/stonith/fence_ipdu.pp
@@ -101,6 +101,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -159,6 +171,8 @@ define pacemaker::stonith::fence_ipdu (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -283,11 +297,13 @@ define pacemaker::stonith::fence_ipdu (
Package['fence-agents-ipdu'] -> Pcmk_stonith["stonith-fence_ipdu-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ipdu-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ipdu',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ipdu',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ipmilan.pp b/manifests/stonith/fence_ipmilan.pp
index 0664db98..2b2babc1 100644
--- a/manifests/stonith/fence_ipmilan.pp
+++ b/manifests/stonith/fence_ipmilan.pp
@@ -71,6 +71,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -119,6 +131,8 @@ define pacemaker::stonith::fence_ipmilan (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$auth_chunk = $auth ? {
undef => '',
@@ -203,11 +217,13 @@ define pacemaker::stonith::fence_ipmilan (
Package['fence-agents-ipmilan'] -> Pcmk_stonith["stonith-fence_ipmilan-${safe_title}"]
}
pcmk_stonith { "stonith-fence_ipmilan-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ipmilan',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ipmilan',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_ironic.pp b/manifests/stonith/fence_ironic.pp
index a29cfcab..7047a967 100644
--- a/manifests/stonith/fence_ironic.pp
+++ b/manifests/stonith/fence_ironic.pp
@@ -56,6 +56,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -99,6 +111,8 @@ define pacemaker::stonith::fence_ironic (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$debug_chunk = $debug ? {
undef => '',
@@ -160,11 +174,13 @@ define pacemaker::stonith::fence_ironic (
pcmk_stonith { "stonith-fence_ironic-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_ironic',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_ironic',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_kdump.pp b/manifests/stonith/fence_kdump.pp
index 96a013ef..c41858ba 100644
--- a/manifests/stonith/fence_kdump.pp
+++ b/manifests/stonith/fence_kdump.pp
@@ -47,6 +47,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -87,6 +99,8 @@ define pacemaker::stonith::fence_kdump (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$nodename_chunk = $nodename ? {
undef => '',
@@ -139,11 +153,13 @@ define pacemaker::stonith::fence_kdump (
Package['fence-agents-kdump'] -> Pcmk_stonith["stonith-fence_kdump-${safe_title}"]
}
pcmk_stonith { "stonith-fence_kdump-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_kdump',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_kdump',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_rhevm.pp b/manifests/stonith/fence_rhevm.pp
index 97ee480e..333742b2 100644
--- a/manifests/stonith/fence_rhevm.pp
+++ b/manifests/stonith/fence_rhevm.pp
@@ -92,6 +92,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -147,6 +159,8 @@ define pacemaker::stonith::fence_rhevm (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -259,11 +273,13 @@ define pacemaker::stonith::fence_rhevm (
Package['fence-agents-rhevm'] -> Pcmk_stonith["stonith-fence_rhevm-${safe_title}"]
}
pcmk_stonith { "stonith-fence_rhevm-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_rhevm',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_rhevm',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_rsb.pp b/manifests/stonith/fence_rsb.pp
index fc9c1c6a..488b175c 100644
--- a/manifests/stonith/fence_rsb.pp
+++ b/manifests/stonith/fence_rsb.pp
@@ -86,6 +86,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -139,6 +151,8 @@ define pacemaker::stonith::fence_rsb (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -243,11 +257,13 @@ define pacemaker::stonith::fence_rsb (
Package['fence-agents-rsb'] -> Pcmk_stonith["stonith-fence_rsb-${safe_title}"]
}
pcmk_stonith { "stonith-fence_rsb-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_rsb',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_rsb',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_scsi.pp b/manifests/stonith/fence_scsi.pp
index 9590a211..1ef53a6b 100644
--- a/manifests/stonith/fence_scsi.pp
+++ b/manifests/stonith/fence_scsi.pp
@@ -47,6 +47,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -87,6 +99,8 @@ define pacemaker::stonith::fence_scsi (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$aptpl_chunk = $aptpl ? {
undef => '',
@@ -139,11 +153,13 @@ define pacemaker::stonith::fence_scsi (
Package['fence-agents-scsi'] -> Pcmk_stonith["stonith-fence_scsi-${safe_title}"]
}
pcmk_stonith { "stonith-fence_scsi-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_scsi',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_scsi',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_virt.pp b/manifests/stonith/fence_virt.pp
index 89a912cc..47e1e2cc 100644
--- a/manifests/stonith/fence_virt.pp
+++ b/manifests/stonith/fence_virt.pp
@@ -56,6 +56,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -99,6 +111,8 @@ define pacemaker::stonith::fence_virt (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$debug_chunk = $debug ? {
undef => '',
@@ -163,11 +177,13 @@ define pacemaker::stonith::fence_virt (
Package['fence-virt'] -> Pcmk_stonith["stonith-fence_virt-${safe_title}"]
}
pcmk_stonith { "stonith-fence_virt-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_virt',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_virt',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_vmware_soap.pp b/manifests/stonith/fence_vmware_soap.pp
index 93d86127..2d72dbcc 100644
--- a/manifests/stonith/fence_vmware_soap.pp
+++ b/manifests/stonith/fence_vmware_soap.pp
@@ -92,6 +92,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -147,6 +159,8 @@ define pacemaker::stonith::fence_vmware_soap (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -259,11 +273,13 @@ define pacemaker::stonith::fence_vmware_soap (
Package['fence-agents-vmware-soap'] -> Pcmk_stonith["stonith-fence_vmware_soap-${safe_title}"]
}
pcmk_stonith { "stonith-fence_vmware_soap-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_vmware_soap',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_vmware_soap',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/manifests/stonith/fence_wti.pp b/manifests/stonith/fence_wti.pp
index b8ed1259..b1fa4ea0 100644
--- a/manifests/stonith/fence_wti.pp
+++ b/manifests/stonith/fence_wti.pp
@@ -92,6 +92,18 @@
# (optional) String of meta attributes
# Defaults to undef
#
+# [*deep_compare*]
+# Enable deep comparing of resources and bundles
+# When set to true a resource will be compared in full (options, meta parameters,..)
+# to the existing one and in case of difference it will be repushed to the CIB
+# Defaults to false
+#
+# [*update_settle_secs*]
+# When deep_compare is enabled and puppet updates a resource, this
+# parameter represents the number (in seconds) to wait for the cluster to settle
+# after the resource update.
+# Defaults to 600 (seconds)
+#
# === Dependencies
# None
#
@@ -147,6 +159,8 @@ define pacemaker::stonith::fence_wti (
$tries = undef,
$try_sleep = undef,
+ $deep_compare = false,
+ $update_settle_secs = 600,
) {
$ipaddr_chunk = $ipaddr ? {
undef => '',
@@ -259,11 +273,13 @@ define pacemaker::stonith::fence_wti (
Package['fence-agents-wti'] -> Pcmk_stonith["stonith-fence_wti-${safe_title}"]
}
pcmk_stonith { "stonith-fence_wti-${safe_title}":
- ensure => $ensure,
- stonith_type => 'fence_wti',
- pcmk_host_list => $pcmk_host_value_chunk,
- pcs_param_string => $param_string,
- tries => $tries,
- try_sleep => $try_sleep,
+ ensure => $ensure,
+ stonith_type => 'fence_wti',
+ pcmk_host_list => $pcmk_host_value_chunk,
+ pcs_param_string => $param_string,
+ tries => $tries,
+ try_sleep => $try_sleep,
+ deep_compare => $deep_compare,
+ update_settle_secs => $update_settle_secs,
}
}
diff --git a/spec/unit/puppet/provider/cib-orig.xml b/spec/unit/puppet/provider/cib-orig.xml
index 0c3dfe9c..d54bb606 100644
--- a/spec/unit/puppet/provider/cib-orig.xml
+++ b/spec/unit/puppet/provider/cib-orig.xml
@@ -29,34 +29,34 @@
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -105,9 +105,9 @@
-
-
-
+
+
+
@@ -119,16 +119,16 @@
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -159,15 +159,15 @@
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -198,14 +198,14 @@
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/spec/unit/puppet/provider/pcmk_common_spec.rb b/spec/unit/puppet/provider/pcmk_common_spec.rb
index 9ed54d1d..23c34b3c 100644
--- a/spec/unit/puppet/provider/pcmk_common_spec.rb
+++ b/spec/unit/puppet/provider/pcmk_common_spec.rb
@@ -21,18 +21,25 @@ describe "pcmk_common functions" do
it "pcs_offline noop update" do
expect(pcs_offline('resource update ip-172.16.11.97 cidr_netmask=32', 'cib-noop.xml')).to eq ""
+ expect(pcs_offline('resource update stonith-fence_ipmilan-stonith-fence-1 passwd=renVamyep3!', 'cib-noop.xml')).to eq ""
end
it "pcmk_restart_resource? noop" do
expect(pcmk_restart_resource?('foo', "cib-noop.xml")).to eq false
expect(pcmk_restart_resource?('ip-172.16.11.97', "cib-noop.xml")).to eq false
+ expect(pcmk_restart_resource?('stonith-fence_ipmilan-stonith-fence-1', "cib-noop.xml")).to eq false
end
it "pcs_offline update to resource definition" do
expect(pcs_offline('resource update ip-172.16.11.97 cidr_netmask=31', 'cib-resource.xml')).to eq ""
+ expect(pcs_offline('resource update stonith-fence_ipmilan-stonith-fence-1 passwd=NewPassword', 'cib-resource.xml')).to eq ""
end
it "pcmk_restart_resource? vip resource" do
expect(pcmk_restart_resource?('foo', "cib-resource.xml")).to eq false
expect(pcmk_restart_resource?('ip-172.16.11.97', "cib-resource.xml")).to eq true
end
+ it "pcmk_restart_resource? stonith resource" do
+ expect(pcmk_restart_resource?('foo', "cib-resource.xml")).to eq false
+ expect(pcmk_restart_resource?('stonith-fence_ipmilan-stonith-fence-1', "cib-resource.xml")).to eq true
+ end
it "pcs_offline update to bundle definition" do
# We effectively change the number of replicas from 3 to 2
@@ -63,11 +70,16 @@ describe "pcmk_common functions" do
it "pcmk_restart_resource_ng? noop" do
expect(pcmk_restart_resource_ng?('foo', "cib-noop.xml")).to eq false
expect(pcmk_restart_resource_ng?('ip-172.16.11.97', "cib-noop.xml")).to eq false
+ expect(pcmk_restart_resource_ng?('stonith-fence_ipmilan-stonith-fence-1', "cib-noop.xml")).to eq false
end
it "pcmk_restart_resource_ng? vip resource" do
expect(pcmk_restart_resource_ng?('foo', "cib-resource.xml")).to eq false
expect(pcmk_restart_resource_ng?('ip-172.16.11.97', "cib-resource.xml")).to eq true
end
+ it "pcmk_restart_resource_ng? stonith resource" do
+ expect(pcmk_restart_resource_ng?('foo', "cib-resource.xml")).to eq false
+ expect(pcmk_restart_resource_ng?('stonith-fence_ipmilan-stonith-fence-1', "cib-resource.xml")).to eq true
+ end
it "pcmk_restart_resource_ng? bundle resource" do
expect(pcmk_restart_resource_ng?('foo', "cib-bundle.xml")).to eq false
expect(pcmk_restart_resource_ng?('test_bundle', "cib-bundle.xml")).to eq true