Fix extraction of stonith parameter from parameter string
Pacemaker::Resource.extract_hash() is written to extract things from a complete CIB object definition. Therefore it rightfully expects whitespaces before the data_type ("params" in this case). So we just add those here to make the string parsable by extract_hash. https://bugzilla.novell.com/show_bug.cgi?id=887244
This commit is contained in:
parent
68836e12bf
commit
0b93f5ea16
|
@ -93,7 +93,7 @@ when "shared"
|
|||
if params.respond_to?('to_hash')
|
||||
primitive_params = params.to_hash
|
||||
elsif params.is_a?(String)
|
||||
primitive_params = ::Pacemaker::Resource.extract_hash("params #{params}", "params")
|
||||
primitive_params = ::Pacemaker::Resource.extract_hash(" params #{params}", "params")
|
||||
else
|
||||
message = "Unknown format for shared fencing agent parameters: #{params.inspect}."
|
||||
Chef::Log.fatal(message)
|
||||
|
@ -134,7 +134,7 @@ when "per_node"
|
|||
if params.respond_to?('to_hash')
|
||||
primitive_params = params.to_hash
|
||||
elsif params.is_a?(String)
|
||||
primitive_params = ::Pacemaker::Resource.extract_hash("params #{params}", "params")
|
||||
primitive_params = ::Pacemaker::Resource.extract_hash(" params #{params}", "params")
|
||||
else
|
||||
message = "Unknown format for per-node fencing agent parameters of #{node_name}: #{params.inspect}."
|
||||
Chef::Log.fatal(message)
|
||||
|
|
Loading…
Reference in New Issue