Extend deep_compare to stonith resources

This commit extends the deep_compare logic to stonith resources,
allowing operators to update their fencing configuration by editing
the relevant yaml files and running a stack update.

Needs 'pacemaker::stonith::$(fence_XXX)::deep_compare: true' to be set
as it is false by default.

If necessary users can also change the value of:

'pacemaker::stonith::$(fence_XXX)::update_settle_secs' (600s by default)

Tested as following:

1. Deployed overcloud with fencing.yaml containing:

parameter_defaults:
  EnableFencing: true
  FencingConfig:
    devices:
    - agent: fence_ipmilan
      host_mac: 52:54:00:99:08:46
      params:
        ipaddr: 172.16.0.1
        ipport: '6230'
        lanplus: true
        login: admin
        passwd: password

resulting in:

$ pcs stonith show stonith-fence_ipmilan-525400990846 |grep passwd |awk '{print $6}'
passwd=password

2. Changed the "password" value:

        passwd: bogus

3. Did a stack update, result:

$ pcs stonith show stonith-fence_ipmilan-525400990846 |grep passwd |awk '{print $6}'
passwd=bogus

Change-Id: I1a9b3090e84c32755b5d538f0a7ee080221420fe
This commit is contained in:
Luca Miccini 2019-08-30 11:25:57 +02:00
parent 8b30131ef7
commit 0389f99f43
38 changed files with 877 additions and 259 deletions

View File

@ -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 ? {
@ -137,6 +151,8 @@ define pacemaker::stonith::#{@parser.getAgentName} (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}
eos

View File

@ -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]

View File

@ -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]
# 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
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])
# If the location_rule already existed, we only create the resource
elsif did_stonith_location_exist and not did_stonith_resource_exist
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
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
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?

View File

@ -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.

View File

@ -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 => '',
@ -302,5 +316,7 @@ define pacemaker::stonith::fence_amt (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -273,5 +287,7 @@ define pacemaker::stonith::fence_apc (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_apc_snmp (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -273,5 +287,7 @@ define pacemaker::stonith::fence_bladecenter (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -265,5 +279,7 @@ define pacemaker::stonith::fence_brocade (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_cisco_mds (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -273,5 +287,7 @@ define pacemaker::stonith::fence_cisco_ucs (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -329,5 +343,7 @@ define pacemaker::stonith::fence_compute (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -273,5 +287,7 @@ define pacemaker::stonith::fence_drac5 (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_eaton_snmp (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -241,5 +255,7 @@ define pacemaker::stonith::fence_eps (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -273,5 +287,7 @@ define pacemaker::stonith::fence_hpblade (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_ibmblade (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -201,5 +215,7 @@ define pacemaker::stonith::fence_idrac (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_ifmib (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -257,5 +271,7 @@ define pacemaker::stonith::fence_ilo (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -257,5 +271,7 @@ define pacemaker::stonith::fence_ilo2 (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -201,5 +215,7 @@ define pacemaker::stonith::fence_ilo3 (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -201,5 +215,7 @@ define pacemaker::stonith::fence_ilo4 (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -249,5 +263,7 @@ define pacemaker::stonith::fence_ilo_mp (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -201,5 +215,7 @@ define pacemaker::stonith::fence_imm (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_intelmodular (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -289,5 +303,7 @@ define pacemaker::stonith::fence_ipdu (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -209,5 +223,7 @@ define pacemaker::stonith::fence_ipmilan (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -166,5 +180,7 @@ define pacemaker::stonith::fence_ironic (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -145,5 +159,7 @@ define pacemaker::stonith::fence_kdump (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -265,5 +279,7 @@ define pacemaker::stonith::fence_rhevm (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -249,5 +263,7 @@ define pacemaker::stonith::fence_rsb (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -145,5 +159,7 @@ define pacemaker::stonith::fence_scsi (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -169,5 +183,7 @@ define pacemaker::stonith::fence_virt (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -265,5 +279,7 @@ define pacemaker::stonith::fence_vmware_soap (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -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 => '',
@ -265,5 +279,7 @@ define pacemaker::stonith::fence_wti (
pcs_param_string => $param_string,
tries => $tries,
try_sleep => $try_sleep,
deep_compare => $deep_compare,
update_settle_secs => $update_settle_secs,
}
}

View File

@ -29,34 +29,34 @@
</node>
</nodes>
<resources>
<primitive class="stonith" id="stonith-fence_amt-stonith-fence-1" type="fence_amt">
<instance_attributes id="stonith-fence_amt-stonith-fence-1-instance_attributes">
<nvpair id="stonith-fence_amt-stonith-fence-1-instance_attributes-ipaddr" name="ipaddr" value="192.0.3.99"/>
<nvpair id="stonith-fence_amt-stonith-fence-1-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_amt-stonith-fence-1-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-0"/>
<primitive class="stonith" id="stonith-fence_ipmilan-stonith-fence-1" type="fence_ipmilan">
<instance_attributes id="stonith-fence_ipmilan-stonith-fence-1-instance_attributes">
<nvpair id="stonith-fence_ipmilan-stonith-fence-1-instance_attributes-ipaddr" name="ipaddr" value="192.0.3.99"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-1-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-1-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-0"/>
</instance_attributes>
<operations>
<op id="stonith-fence_amt-stonith-fence-1-monitor-interval-60s" interval="60s" name="monitor"/>
<op id="stonith-fence_ipmilan-stonith-fence-1-monitor-interval-60s" interval="60s" name="monitor"/>
</operations>
</primitive>
<primitive class="stonith" id="stonith-fence_amt-stonith-fence-2" type="fence_amt">
<instance_attributes id="stonith-fence_amt-stonith-fence-2-instance_attributes">
<nvpair id="stonith-fence_amt-stonith-fence-2-instance_attributes-ipaddr" name="ipaddr" value="192.0.2.100"/>
<nvpair id="stonith-fence_amt-stonith-fence-2-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_amt-stonith-fence-2-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-1"/>
<primitive class="stonith" id="stonith-fence_ipmilan-stonith-fence-2" type="fence_ipmilan">
<instance_attributes id="stonith-fence_ipmilan-stonith-fence-2-instance_attributes">
<nvpair id="stonith-fence_ipmilan-stonith-fence-2-instance_attributes-ipaddr" name="ipaddr" value="192.0.2.100"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-2-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-2-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-1"/>
</instance_attributes>
<operations>
<op id="stonith-fence_amt-stonith-fence-2-monitor-interval-60s" interval="60s" name="monitor"/>
<op id="stonith-fence_ipmilan-stonith-fence-2-monitor-interval-60s" interval="60s" name="monitor"/>
</operations>
</primitive>
<primitive class="stonith" id="stonith-fence_amt-stonith-fence-3" type="fence_amt">
<instance_attributes id="stonith-fence_amt-stonith-fence-3-instance_attributes">
<nvpair id="stonith-fence_amt-stonith-fence-3-instance_attributes-ipaddr" name="ipaddr" value="192.0.2.101"/>
<nvpair id="stonith-fence_amt-stonith-fence-3-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_amt-stonith-fence-3-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-2"/>
<primitive class="stonith" id="stonith-fence_ipmilan-stonith-fence-3" type="fence_ipmilan">
<instance_attributes id="stonith-fence_ipmilan-stonith-fence-3-instance_attributes">
<nvpair id="stonith-fence_ipmilan-stonith-fence-3-instance_attributes-ipaddr" name="ipaddr" value="192.0.2.101"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-3-instance_attributes-passwd" name="passwd" value="renVamyep3!"/>
<nvpair id="stonith-fence_ipmilan-stonith-fence-3-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="foobar-2"/>
</instance_attributes>
<operations>
<op id="stonith-fence_amt-stonith-fence-3-monitor-interval-60s" interval="60s" name="monitor"/>
<op id="stonith-fence_ipmilan-stonith-fence-3-monitor-interval-60s" interval="60s" name="monitor"/>
</operations>
</primitive>
<bundle id="test_bundle">
@ -105,9 +105,9 @@
</clone>
</resources>
<constraints>
<rsc_location id="location-stonith-fence_amt-stonith-fence-1-foobar-0--INFINITY" node="foobar-0" rsc="stonith-fence_amt-stonith-fence-1" score="-INFINITY"/>
<rsc_location id="location-stonith-fence_amt-stonith-fence-2-foobar-1--INFINITY" node="foobar-1" rsc="stonith-fence_amt-stonith-fence-2" score="-INFINITY"/>
<rsc_location id="location-stonith-fence_amt-stonith-fence-3-foobar-2--INFINITY" node="foobar-2" rsc="stonith-fence_amt-stonith-fence-3" score="-INFINITY"/>
<rsc_location id="location-stonith-fence_ipmilan-stonith-fence-1-foobar-0--INFINITY" node="foobar-0" rsc="stonith-fence_ipmilan-stonith-fence-1" score="-INFINITY"/>
<rsc_location id="location-stonith-fence_ipmilan-stonith-fence-2-foobar-1--INFINITY" node="foobar-1" rsc="stonith-fence_ipmilan-stonith-fence-2" score="-INFINITY"/>
<rsc_location id="location-stonith-fence_ipmilan-stonith-fence-3-foobar-2--INFINITY" node="foobar-2" rsc="stonith-fence_ipmilan-stonith-fence-3" score="-INFINITY"/>
<rsc_location id="location-rabbitmq-clone" resource-discovery="exclusive" rsc="rabbitmq-clone">
<rule id="location-rabbitmq-clone-rule" score="0">
<expression attribute="rabbitmq-role" id="location-rabbitmq-clone-rule-expr" operation="eq" value="true"/>
@ -119,16 +119,16 @@
<node_state id="1" uname="foobar-0" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
<lrm id="1">
<lrm_resources>
<lrm_resource id="stonith-fence_amt-stonith-fence-1" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-1_last_0" operation_key="stonith-fence_amt-stonith-fence-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;2:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1523017362" last-rc-change="1523017362" exec-time="1" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-1" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-1_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;2:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1523017362" last-rc-change="1523017362" exec-time="1" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-2" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-2_last_0" operation_key="stonith-fence_amt-stonith-fence-2_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;5:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="10" rc-code="0" op-status="0" interval="0" last-run="1523017368" last-rc-change="1523017368" exec-time="1372" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-2_monitor_60000" operation_key="stonith-fence_amt-stonith-fence-2_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;6:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="11" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017370" exec-time="347" queue-time="0" op-digest="1b6e96c30cd893e21ef817d56c08b03c" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-2" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-2_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-2_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;5:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="10" rc-code="0" op-status="0" interval="0" last-run="1523017368" last-rc-change="1523017368" exec-time="1372" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-2_monitor_60000" operation_key="stonith-fence_ipmilan-stonith-fence-2_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;6:10:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="11" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017370" exec-time="347" queue-time="0" op-digest="1b6e96c30cd893e21ef817d56c08b03c" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-3" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-3_last_0" operation_key="stonith-fence_amt-stonith-fence-3_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="8:13:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;8:13:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="16" rc-code="0" op-status="0" interval="0" last-run="1523017372" last-rc-change="1523017372" exec-time="373" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-3_monitor_60000" operation_key="stonith-fence_amt-stonith-fence-3_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="19:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;19:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="17" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017374" exec-time="524" queue-time="0" op-digest="39a65383b8fc43227462ca188262169d" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-3" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-3_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-3_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="8:13:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;8:13:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="16" rc-code="0" op-status="0" interval="0" last-run="1523017372" last-rc-change="1523017372" exec-time="373" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-3_monitor_60000" operation_key="stonith-fence_ipmilan-stonith-fence-3_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="19:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;19:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="17" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017374" exec-time="524" queue-time="0" op-digest="39a65383b8fc43227462ca188262169d" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
</lrm_resource>
<lrm_resource id="test_bundle-docker-1" type="docker" class="ocf" provider="heartbeat">
<lrm_rsc_op id="test_bundle-docker-1_last_0" operation_key="test_bundle-docker-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:14:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;5:14:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-0" call-id="25" rc-code="7" op-status="0" interval="0" last-run="1523017374" last-rc-change="1523017374" exec-time="140" queue-time="0" op-digest="635b2bc9607b43869f8f42920727446e"/>
@ -159,15 +159,15 @@
<node_state id="2" uname="foobar-1" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
<lrm id="2">
<lrm_resources>
<lrm_resource id="stonith-fence_amt-stonith-fence-1" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-1_last_0" operation_key="stonith-fence_amt-stonith-fence-1_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;2:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="6" rc-code="0" op-status="0" interval="0" last-run="1523017363" last-rc-change="1523017363" exec-time="1381" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-1_monitor_60000" operation_key="stonith-fence_amt-stonith-fence-1_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="3:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;3:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="7" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017365" exec-time="376" queue-time="0" op-digest="f251574e6cd2fec78c54b1807f085f85" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-1" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-1_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-1_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;2:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="6" rc-code="0" op-status="0" interval="0" last-run="1523017363" last-rc-change="1523017363" exec-time="1381" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-1_monitor_60000" operation_key="stonith-fence_ipmilan-stonith-fence-1_monitor_60000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="3:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;3:7:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="7" rc-code="0" op-status="0" interval="60000" last-rc-change="1523017365" exec-time="376" queue-time="0" op-digest="f251574e6cd2fec78c54b1807f085f85" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-2" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-2_last_0" operation_key="stonith-fence_amt-stonith-fence-2_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="4:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;4:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="11" rc-code="7" op-status="0" interval="0" last-run="1523017366" last-rc-change="1523017366" exec-time="0" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-2" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-2_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-2_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="4:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;4:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="11" rc-code="7" op-status="0" interval="0" last-run="1523017366" last-rc-change="1523017366" exec-time="0" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-3" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-3_last_0" operation_key="stonith-fence_amt-stonith-fence-3_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;5:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="15" rc-code="7" op-status="0" interval="0" last-run="1523017371" last-rc-change="1523017371" exec-time="0" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-3" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-3_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-3_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;5:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="15" rc-code="7" op-status="0" interval="0" last-run="1523017371" last-rc-change="1523017371" exec-time="0" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
</lrm_resource>
<lrm_resource id="test_bundle-docker-1" type="docker" class="ocf" provider="heartbeat">
<lrm_rsc_op id="test_bundle-docker-1_last_0" operation_key="test_bundle-docker-1_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="22:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:0;22:14:0:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-1" call-id="28" rc-code="0" op-status="0" interval="0" last-run="1523017374" last-rc-change="1523017374" exec-time="493" queue-time="0" op-digest="635b2bc9607b43869f8f42920727446e"/>
@ -198,14 +198,14 @@
<node_state id="3" uname="foobar-2" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
<lrm id="3">
<lrm_resources>
<lrm_resource id="stonith-fence_amt-stonith-fence-1" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-1_last_0" operation_key="stonith-fence_amt-stonith-fence-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="4:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;4:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1523017362" last-rc-change="1523017362" exec-time="4" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-1" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-1_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="4:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;4:5:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1523017362" last-rc-change="1523017362" exec-time="4" queue-time="0" op-digest="c200ae5d45b5c3cbba9fee03e78cacfe" op-secure-params=" passwd password " op-secure-digest="50391a6be4d0d4ebb76998356c8ff966"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-2" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-2_last_0" operation_key="stonith-fence_amt-stonith-fence-2_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;5:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1523017366" last-rc-change="1523017366" exec-time="0" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-2" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-2_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-2_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="5:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;5:8:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1523017366" last-rc-change="1523017366" exec-time="0" queue-time="0" op-digest="fa99cc06478ff373a3c01d551764307a" op-secure-params=" passwd password " op-secure-digest="43d7a028a1d194c5265a3b3ce302fde5"/>
</lrm_resource>
<lrm_resource id="stonith-fence_amt-stonith-fence-3" type="fence_amt" class="stonith">
<lrm_rsc_op id="stonith-fence_amt-stonith-fence-3_last_0" operation_key="stonith-fence_amt-stonith-fence-3_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;6:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="13" rc-code="7" op-status="0" interval="0" last-run="1523017371" last-rc-change="1523017371" exec-time="0" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
<lrm_resource id="stonith-fence_ipmilan-stonith-fence-3" type="fence_ipmilan" class="stonith">
<lrm_rsc_op id="stonith-fence_ipmilan-stonith-fence-3_last_0" operation_key="stonith-fence_ipmilan-stonith-fence-3_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;6:11:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="13" rc-code="7" op-status="0" interval="0" last-run="1523017371" last-rc-change="1523017371" exec-time="0" queue-time="0" op-digest="01086af23cd7814717dd88ba475f6923" op-secure-params=" passwd password " op-secure-digest="f81520ca6e7990fb7f328802941e5fd6"/>
</lrm_resource>
<lrm_resource id="test_bundle-docker-1" type="docker" class="ocf" provider="heartbeat">
<lrm_rsc_op id="test_bundle-docker-1_last_0" operation_key="test_bundle-docker-1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="11:14:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" transition-magic="0:7;11:14:7:604473fe-c25e-49df-a803-9e1d0a74f9ba" on_node="foobar-2" call-id="21" rc-code="7" op-status="0" interval="0" last-run="1523017374" last-rc-change="1523017374" exec-time="97" queue-time="0" op-digest="635b2bc9607b43869f8f42920727446e"/>

View File

@ -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