ironfan 4.4.2 → 4.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v4.4.3:
2
+ * workaround to make ec2 regions respect the cluster's region/AZ preference
3
+ * Making validation scope name prefix properly (fixes #201)
4
+
1
5
  # v4.4.2:
2
6
  * Support for intra-cluster ICMP and specs to prove it (thanks @nickmarden)
3
7
  * Knife bash completion script: see config/knife.bash.README.md for installation (thanks @schade)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.4.2
1
+ 4.4.3
data/ironfan.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ironfan"
8
- s.version = "4.4.2"
8
+ s.version = "4.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2012-10-24"
12
+ s.date = "2012-10-31"
13
13
  s.description = "Ironfan allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -36,6 +36,7 @@ module Ironfan
36
36
  #
37
37
  ui.info("Inventorying servers in #{desc}")
38
38
  cluster = Ironfan.load_cluster(cluster_name)
39
+ Chef::Config[:knife][:region] = cluster.servers.to_a.first.cloud(:ec2).region
39
40
  computers = broker.discover! cluster
40
41
  Chef::Log.info("Inventoried #{computers.size} computers")
41
42
  #
@@ -38,7 +38,7 @@ module Ironfan
38
38
  bit_str = "#{self.bits.to_i}-bit" # correct for legacy image info.
39
39
  keys = [region, bit_str, backing, image_name]
40
40
  info = Chef::Config[:ec2_image_info][ keys ]
41
- ui.warn("Can't find image for #{[region, bits.to_s, backing, image_name].inspect}") if info.blank?
41
+ ui.warn("Can't find image for #{[region, bit_str, backing, image_name].inspect}") if info.blank?
42
42
  return info || {}
43
43
  end
44
44
 
@@ -130,7 +130,7 @@ module Ironfan
130
130
  def self.validate_resources!(computers)
131
131
  recall.each_value do |machine|
132
132
  next unless machine.users.empty? and machine.name
133
- if machine.name.match("^#{computers.cluster.name}")
133
+ if machine.name.match("^#{computers.cluster.name}-")
134
134
  machine.bogus << :unexpected_machine
135
135
  end
136
136
  next unless machine.bogus?
@@ -204,6 +204,10 @@ module Ironfan
204
204
  errors["No AMI found"] = info if cloud.image_id.blank?
205
205
  errors['Missing client'] = info unless computer.client?
206
206
  errors['Missing private_key'] = computer.client unless computer.private_key
207
+ #
208
+ all_asserted_regions = [Ec2.connection.region, cloud.region, Chef::Config[:knife][:region], Ironfan.chef_config[:region]].compact.uniq
209
+ errors["mismatched region"] = all_asserted_regions unless all_asserted_regions.count == 1
210
+ #
207
211
  errors
208
212
  end
209
213
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ironfan
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 4.4.2
5
+ version: 4.4.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Infochimps
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-10-24 00:00:00 Z
13
+ date: 2012-10-31 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: chef
@@ -281,7 +281,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
281
  requirements:
282
282
  - - ">="
283
283
  - !ruby/object:Gem::Version
284
- hash: -2266640739538756460
284
+ hash: -706290733514954892
285
285
  segments:
286
286
  - 0
287
287
  version: "0"