For per_node STONITH, be a bit clever for auto-generation of host* param
Some STONITH plugin take hostname as param, while some take hostlist. And we can't really guess that. So for now, we check if there's a hostname or hostlist key in the params, and if one of them is there, we don't do anything. If none is them, we try with hostname.
This commit is contained in:
parent
7722560153
commit
3016e33d0f
|
@ -93,11 +93,11 @@ when "per_node"
|
||||||
raise message
|
raise message
|
||||||
end
|
end
|
||||||
|
|
||||||
# Only set hostlist param if it's missing; we do not overwrite it as the
|
# Only set one of hostname / hostlist param if none of them are present; we
|
||||||
# user might have passed more information than just the hostname (some
|
# do not overwrite it as the user might have passed more information than
|
||||||
# plugins accept hostname:data in hostlist)
|
# just the hostname (some plugins accept hostname:data in hostlist)
|
||||||
unless primitive_params.has_key?("hostlist")
|
unless primitive_params.has_key?("hostname") || primitive_params.has_key?("hostlist")
|
||||||
primitive_params["hostlist"] = node_name
|
primitive_params["hostname"] = node_name
|
||||||
end
|
end
|
||||||
|
|
||||||
pacemaker_primitive stonith_resource do
|
pacemaker_primitive stonith_resource do
|
||||||
|
|
Loading…
Reference in New Issue