Permalink
Browse files

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

  • Loading branch information...
1 parent 91b2616 commit 6056b491610c7e951b082b5c0b64c2b13eaae7dc @nickmarden nickmarden committed Dec 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit 6056b49

Please sign in to comment.