ensure that necessary autoscaling processes are not suspended

This commit is contained in:
Anuj Biyani
2013-06-03 19:31:10 -07:00
parent 8c24fa8dbf
commit 5f4b9b59bf
3 changed files with 12 additions and 3 deletions

View File

@@ -20,6 +20,12 @@ class AwsHaRelease
end
def execute!
%w(RemoveFromLoadBalancerLowPriority Terminate Launch HealthCheck AddToLoadBalancer).each do |process|
if @group.suspended_processes.keys.include? process
raise "AutoScaling process #{process} is currently suspended on #{@group.name} but is necessary for this script."
end
end
@group.suspend_processes @processes_to_suspend
if @group.max_size == @group.desired_capacity