revert only_if commands and change to use short node.name
This commit is contained in:
parent
4e751b033d
commit
3c11b43c5f
@ -1,3 +1,4 @@
|
|||||||
|
# Only use short hostname (not FQDN)
|
||||||
default['pacemaker']['nodes'] = ['node1', 'node2']
|
default['pacemaker']['nodes'] = ['node1', 'node2']
|
||||||
|
|
||||||
default['pacemaker']['primitive']['drbd']['agent'] = "ocf:linbit:drbd"
|
default['pacemaker']['primitive']['drbd']['agent'] = "ocf:linbit:drbd"
|
||||||
@ -18,8 +19,7 @@ default['pacemaker']['primitive']['clvm']['op']['monitor']['interval'] = "5s"
|
|||||||
default['pacemaker']['primitive']['clvm']['op']['monitor']['on-fail'] = "restart"
|
default['pacemaker']['primitive']['clvm']['op']['monitor']['on-fail'] = "restart"
|
||||||
default['pacemaker']['primitive']['clvm']['active'] = "#{pacemaker['nodes']}"
|
default['pacemaker']['primitive']['clvm']['active'] = "#{pacemaker['nodes']}"
|
||||||
|
|
||||||
# Temporary attribute for vip resource.
|
# Vip address might be replaced by cinder-volume's myip specified in the environment.
|
||||||
# Later, vip address will be set by 'ktc-cinder' cookcook and be fetched here.
|
|
||||||
default['pacemaker']['primitive']['vip']['agent'] = "ocf:heartbeat:IPaddr2"
|
default['pacemaker']['primitive']['vip']['agent'] = "ocf:heartbeat:IPaddr2"
|
||||||
default['pacemaker']['primitive']['vip']['params']['ip'] = "10.5.2.200"
|
default['pacemaker']['primitive']['vip']['params']['ip'] = "10.5.2.200"
|
||||||
default['pacemaker']['primitive']['vip']['params']['cidr_netmask'] = "24"
|
default['pacemaker']['primitive']['vip']['params']['cidr_netmask'] = "24"
|
||||||
|
@ -54,7 +54,7 @@ node['pacemaker']['primitive'].each do |name, attr|
|
|||||||
meta attr['meta']
|
meta attr['meta']
|
||||||
op attr['op']
|
op attr['op']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ node['pacemaker']['location'].each do |name, attr|
|
|||||||
priority attr['priority']
|
priority attr['priority']
|
||||||
loc attr['loc']
|
loc attr['loc']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ node['pacemaker']['ms'].each do |name, attr|
|
|||||||
rsc attr['rsc_name']
|
rsc attr['rsc_name']
|
||||||
meta attr['meta']
|
meta attr['meta']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -82,27 +82,27 @@ node['pacemaker']['clone'].each do |name, attr|
|
|||||||
rsc attr['rsc_name']
|
rsc attr['rsc_name']
|
||||||
meta attr['meta']
|
meta attr['meta']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
node['pacemaker']['colocation'].each do |name, attr|
|
node['pacemaker']['colocation'].each do |name, attr|
|
||||||
pacemaker_colocation name do
|
pacemaker_colocation name do
|
||||||
priority attr['priority']
|
priority attr['priority']
|
||||||
multiple attr['is_multiple']
|
multiple attr['is_multiple']
|
||||||
rsc attr['rsc']
|
rsc attr['rsc']
|
||||||
with_rsc attr['with_rsc']
|
with_rsc attr['with_rsc']
|
||||||
multiple_rscs attr['multiple_rscs']
|
multiple_rscs attr['multiple_rscs']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
node['pacemaker']['order'].each do |name, attr|
|
node['pacemaker']['order'].each do |name, attr|
|
||||||
pacemaker_order name do
|
pacemaker_order name do
|
||||||
priority attr['priority']
|
priority attr['priority']
|
||||||
resources attr['resources']
|
resources attr['resources']
|
||||||
action :create
|
action :create
|
||||||
only_if attr['active'].include?(node.name)
|
only_if { attr['active'].include?(node.name.partition(".")[0]) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user