For per_node STONITH, have each node configure its own resources only
We have some races when creating STONITH resources because nodes are creating resources at the same time. It turns out that, in the case of crowbar, we can have each node configure its own resources only because we know all nodes will run the code.
This commit is contained in:
parent
3e04b36985
commit
7722560153
|
@ -46,6 +46,12 @@ default[:pacemaker][:stonith][:clone][:plugin] = ""
|
|||
default[:pacemaker][:stonith][:clone][:params] = {}
|
||||
|
||||
default[:pacemaker][:stonith][:per_node][:plugin] = ""
|
||||
# This can be "all" or "self":
|
||||
# - if set to "all", then every node will configure the stonith resources for
|
||||
# all nodes in the cluster
|
||||
# - if set to "self", then every node will configure the stonith resource for
|
||||
# itself only
|
||||
default[:pacemaker][:stonith][:per_node][:mode] = "all"
|
||||
# This hash will contain parameters for each node. See documentation for
|
||||
# default[:pacemaker][:stonith][:clone][:params] about the format.
|
||||
# For instance:
|
||||
|
|
|
@ -76,6 +76,10 @@ when "per_node"
|
|||
end
|
||||
|
||||
node[:pacemaker][:stonith][:per_node][:nodes].keys.each do |node_name|
|
||||
if node[:pacemaker][:stonith][:per_node][:mode] == "self"
|
||||
next unless node_name == node[:hostname]
|
||||
end
|
||||
|
||||
stonith_resource = "stonith-#{node_name}"
|
||||
params = node[:pacemaker][:stonith][:per_node][:nodes][node_name][:params]
|
||||
|
||||
|
|
Loading…
Reference in New Issue