Skip to content

Commit d064f4c

Browse files
committed
pacemaker: remove node on delete (SOC-11240)
On node delete, pacemaker needs to remove the node from the cluster prior to being deleted from crowbar. This change adds said feature.
1 parent b75a61d commit d064f4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crowbar_framework/app/models/crowbar_service.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ def transition(inst, name, state)
180180
xs <=> ys
181181
end
182182

183+
# Make sure pacemaker is the first to execute on node delete
184+
if state == "delete"
185+
index = roles.index { |role| role.name.include? "pacemaker" }
186+
roles.unshift(roles.delete_at(index)) unless index.nil?
187+
end
188+
183189
roles.each do |role|
184190
role.override_attributes.each do |bc, data|
185191
rname = role.name.gsub("#{bc}-config-","")

0 commit comments

Comments
 (0)