bosh-director 1.1744.0 → 1.1750.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,8 @@ module Bosh::Director
33
33
  :current_job,
34
34
  :encryption,
35
35
  :fix_stateful_nodes,
36
- :enable_snapshots
36
+ :enable_snapshots,
37
+ :max_vm_create_tries,
37
38
  ]
38
39
 
39
40
  CONFIG_OPTIONS.each do |option|
@@ -59,6 +60,7 @@ module Bosh::Director
59
60
  end
60
61
 
61
62
  def configure(config)
63
+ @max_vm_create_tries = Integer(config.fetch('max_vm_create_tries', 5))
62
64
 
63
65
  @base_dir = config["dir"]
64
66
  FileUtils.mkdir_p(@base_dir)
@@ -219,16 +219,19 @@ module Bosh::Director
219
219
  @resource_pool_spec.cloud_properties,
220
220
  @instance.network_settings, disks,
221
221
  @resource_pool_spec.env)
222
- @instance.model.vm = @vm
223
- @instance.model.save
224
222
 
225
- agent.wait_until_ready
226
- rescue => e
227
- if @vm
228
- @logger.error("error during create_vm(), deleting vm #{@vm.cid}")
229
- delete_vm
223
+ begin
224
+ @instance.model.vm = @vm
225
+ @instance.model.save
226
+
227
+ agent.wait_until_ready
228
+ rescue => e
229
+ if @vm
230
+ @logger.error("error during create_vm(), deleting vm #{@vm.cid}")
231
+ delete_vm
232
+ end
233
+ raise e
230
234
  end
231
- raise e
232
235
  end
233
236
 
234
237
  def apply_state(state)
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.1744.0'
3
+ VERSION = '1.1750.0'
4
4
  end
5
5
  end
@@ -5,9 +5,6 @@ module Bosh::Director
5
5
  class VmCreator
6
6
  include EncryptionHelper
7
7
 
8
- # this is used to retry VM creation on clouds that are unreliable (e.g. AWS)
9
- MAX_CREATE_VM_TRIES = 5
10
-
11
8
  def self.create(*args)
12
9
  new.create(*args)
13
10
  end
@@ -34,8 +31,8 @@ module Bosh::Director
34
31
 
35
32
  if Config.encryption?
36
33
  credentials = generate_agent_credentials
37
- env["bosh"] ||= {}
38
- env["bosh"]["credentials"] = credentials
34
+ env['bosh'] ||= {}
35
+ env['bosh']['credentials'] = credentials
39
36
  options[:credentials] = credentials
40
37
  end
41
38
 
@@ -45,7 +42,7 @@ module Bosh::Director
45
42
  rescue Bosh::Clouds::VMCreationFailed => e
46
43
  count += 1
47
44
  logger.error("failed to create VM, retrying (#{count})")
48
- retry if e.ok_to_retry && count < MAX_CREATE_VM_TRIES
45
+ retry if e.ok_to_retry && count < Config.max_vm_create_tries
49
46
  raise e
50
47
  end
51
48
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-director
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1744.0
4
+ version: 1.1750.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-07 00:00:00.000000000 Z
12
+ date: 2014-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bcrypt-ruby
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 1.1744.0
37
+ version: 1.1750.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.1744.0
45
+ version: 1.1750.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: bosh-core
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 1.1744.0
53
+ version: 1.1750.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 1.1744.0
61
+ version: 1.1750.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: bosh_common
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 1.1744.0
69
+ version: 1.1750.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 1.1744.0
77
+ version: 1.1750.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: bosh_cpi
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: 1.1744.0
85
+ version: 1.1750.0
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: 1.1744.0
93
+ version: 1.1750.0
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: bosh_openstack_cpi
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirements:
99
99
  - - ~>
100
100
  - !ruby/object:Gem::Version
101
- version: 1.1744.0
101
+ version: 1.1750.0
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirements:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
- version: 1.1744.0
109
+ version: 1.1750.0
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: bosh_aws_cpi
112
112
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 1.1744.0
117
+ version: 1.1750.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 1.1744.0
125
+ version: 1.1750.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: bosh_vsphere_cpi
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ dependencies:
130
130
  requirements:
131
131
  - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: 1.1744.0
133
+ version: 1.1750.0
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  requirements:
139
139
  - - ~>
140
140
  - !ruby/object:Gem::Version
141
- version: 1.1744.0
141
+ version: 1.1750.0
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: eventmachine
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -461,7 +461,7 @@ dependencies:
461
461
  version: '1.0'
462
462
  description: ! 'BOSH Director
463
463
 
464
- 7dfce5'
464
+ 5212a9'
465
465
  email: support@cloudfoundry.com
466
466
  executables:
467
467
  - bosh-director
@@ -712,7 +712,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
712
712
  version: '0'
713
713
  segments:
714
714
  - 0
715
- hash: -1167049547300900363
715
+ hash: 2997654396825944747
716
716
  requirements: []
717
717
  rubyforge_project:
718
718
  rubygems_version: 1.8.23