Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes nested array bug when computing list of AZs for an ELB

  • Loading branch information...
commit 6056b491610c7e951b082b5c0b64c2b13eaae7dc 1 parent 91b2616
@nickmarden nickmarden authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ironfan/provider/ec2/elastic_load_balancer.rb
View
4 lib/ironfan/provider/ec2/elastic_load_balancer.rb
@@ -101,8 +101,8 @@ def self.start_or_sync_elb(elb_name, computers, start_elb)
# Did the list of availability zones for this ELB change?
if availability_zones != elb.availability_zones.sort
Ironfan.step(elb.name, " updating availability zones to #{availability_zones.join(', ')}", :blue)
- to_add = [ availability_zones - elb.availability_zones ]
- to_remove = [ elb.availability_zones - availability_zones ]
+ to_add = availability_zones - elb.availability_zones
+ to_remove = elb.availability_zones - availability_zones
elb.enable_availability_zones(to_add) unless to_add.empty?
elb.disable_availability_zones(to_remove) unless to_remove.empty?
end
Please sign in to comment.
Something went wrong with that request. Please try again.