bosh-director 1.3262.4.0 → 1.3262.24.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fef907f7eb794345ecc71719479d6bccce8c38cd
4
- data.tar.gz: 4a096667cc426bde89ea2857699f5f6540a67038
3
+ metadata.gz: 190cc25c75c791c37722cc202e4a39612d01185b
4
+ data.tar.gz: e867afc4a2edd962e6cf02a82269052817920617
5
5
  SHA512:
6
- metadata.gz: 8895ccf2fb097b628415ec8800a6694e57c3e523e0d9ce05430fb2bc7098f5bf586ac6ad5278d7b552c2f4a426919583d92d994c0975a8209ff482dfad70bff2
7
- data.tar.gz: 6f92d6c25bae4f77039889e3755715399b18bfa1fab63ac28a763c1e72dbe7d8fa551c66f012371d30f82f188e771baa395182d6fc33384ca29dd7c819f9f150
6
+ metadata.gz: fd392842a3bf5ceec33cbb401f6434f78994892d65d79ae257447baf87c907ecc985a967709942defc2bf18a5a8747018a7afb728737c4972b646ec37e8a3424
7
+ data.tar.gz: 285e747b26c8b0327429bc89687e631716cc1368fbec7938f5f84b62a30f6d5dc892edbaaf7b94e7320304984ad02935fe1617e31d73cbbbe2a8fd2c801d1748
@@ -19,9 +19,13 @@ module Bosh::Director
19
19
  bind_releases
20
20
 
21
21
  migrate_legacy_dns_records
22
+
22
23
  network_reservation_repository = Bosh::Director::DeploymentPlan::NetworkReservationRepository.new(@deployment_plan, @logger)
23
- instance_repo = Bosh::Director::DeploymentPlan::InstanceRepository.new(network_reservation_repository, @logger)
24
24
  states_by_existing_instance = current_states_by_instance(@deployment_plan.candidate_existing_instances)
25
+
26
+ migrate_existing_instances_to_global_networking(network_reservation_repository, states_by_existing_instance)
27
+
28
+ instance_repo = Bosh::Director::DeploymentPlan::InstanceRepository.new(network_reservation_repository, @logger)
25
29
  index_assigner = Bosh::Director::DeploymentPlan::PlacementPlanner::IndexAssigner.new(@deployment_plan.model)
26
30
  instance_plan_factory = Bosh::Director::DeploymentPlan::InstancePlanFactory.new(instance_repo, states_by_existing_instance, @deployment_plan.skip_drain, index_assigner, network_reservation_repository, {'recreate' => @deployment_plan.recreate})
27
31
  instance_planner = Bosh::Director::DeploymentPlan::InstancePlanner.new(instance_plan_factory, @logger)
@@ -154,5 +158,18 @@ module Bosh::Director
154
158
  @dns_manager.migrate_legacy_records(instance_model)
155
159
  end
156
160
  end
161
+
162
+ def migrate_existing_instances_to_global_networking(network_reservation_repository, states_by_existing_instance)
163
+ return unless @deployment_plan.using_global_networking?
164
+
165
+ # in the case where this is their first transition to global networking, we need to make sure we have already
166
+ # populated the database/models with the existing IPs. Do this first before we start any of our planning.
167
+ @deployment_plan.instance_models.each do |existing_instance|
168
+ network_reservation_repository.migrate_existing_instance_network_reservations(
169
+ existing_instance,
170
+ states_by_existing_instance[existing_instance]
171
+ )
172
+ end
173
+ end
157
174
  end
158
175
  end
@@ -9,7 +9,7 @@ module Bosh::Director
9
9
  reservations.logger.debug("Creating instance network reservations from agent state for instance '#{instance_model}'")
10
10
 
11
11
  state.fetch('networks', []).each do |network_name, network_config|
12
- reservations.add_existing(instance_model, deployment, network_name, network_config['ip'], '', network_config['type'])
12
+ reservations.add_existing(instance_model, deployment, network_name, network_config['ip'], '', network_config['type'])
13
13
  end
14
14
 
15
15
  reservations
@@ -16,5 +16,11 @@ module Bosh::Director::DeploymentPlan
16
16
  InstanceNetworkReservations.new(@logger)
17
17
  end
18
18
  end
19
+
20
+ def migrate_existing_instance_network_reservations(existing_instance_model, existing_instance_state)
21
+ if !existing_instance_state.nil? && existing_instance_model.ip_addresses.empty?
22
+ InstanceNetworkReservations.create_from_state(existing_instance_model, existing_instance_state, @deployment_plan, @logger)
23
+ end
24
+ end
19
25
  end
20
26
  end
@@ -21,7 +21,13 @@ module Bosh::Director
21
21
  end
22
22
 
23
23
  process_status = ForkedProcess.run do
24
- @job_class.perform(@task_id, *decode(encode(@args)))
24
+ perform_args = []
25
+
26
+ unless @args.nil?
27
+ perform_args = decode(encode(@args))
28
+ end
29
+
30
+ @job_class.perform(@task_id, *perform_args)
25
31
  end
26
32
 
27
33
  if process_status.signaled?
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.3262.4.0'
3
+ VERSION = '1.3262.24.0'
4
4
  end
5
5
  end
@@ -139,6 +139,20 @@ module Bosh::Director
139
139
  env['bosh']['password'] = sha512_hashed_password
140
140
  end
141
141
 
142
+ if instance_model.job
143
+ env['bosh'] ||= {}
144
+ env['bosh']['group'] = Canonicalizer.canonicalize("#{Bosh::Director::Config.name}-#{instance_model.deployment.name}-#{instance_model.job}")
145
+ env['bosh']['groups'] = [
146
+ Bosh::Director::Config.name,
147
+ instance_model.deployment.name,
148
+ instance_model.job,
149
+ "#{Bosh::Director::Config.name}-#{instance_model.deployment.name}",
150
+ "#{instance_model.deployment.name}-#{instance_model.job}",
151
+ "#{Bosh::Director::Config.name}-#{instance_model.deployment.name}-#{instance_model.job}"
152
+ ]
153
+ env['bosh']['groups'].map! { |name| Canonicalizer.canonicalize(name) }
154
+ end
155
+
142
156
  count = 0
143
157
  begin
144
158
  vm_cid = @cloud.create_vm(agent_id, stemcell.cid, cloud_properties, network_settings, disks, env)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-director
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3262.4.0
4
+ version: 1.3262.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2016-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_common
@@ -16,112 +16,112 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3262.4.0
19
+ version: 1.3262.24.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3262.4.0
26
+ version: 1.3262.24.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bosh_cpi
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3262.4.0
33
+ version: 1.3262.24.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3262.4.0
40
+ version: 1.3262.24.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bosh-registry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3262.4.0
47
+ version: 1.3262.24.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3262.4.0
54
+ version: 1.3262.24.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: blobstore_client
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3262.4.0
61
+ version: 1.3262.24.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.3262.4.0
68
+ version: 1.3262.24.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bosh-core
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3262.4.0
75
+ version: 1.3262.24.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.3262.4.0
82
+ version: 1.3262.24.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bosh-director-core
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3262.4.0
89
+ version: 1.3262.24.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3262.4.0
96
+ version: 1.3262.24.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bosh-template
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3262.4.0
103
+ version: 1.3262.24.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.3262.4.0
110
+ version: 1.3262.24.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bosh_openstack_cpi
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 2.1.1
117
+ version: 2.1.3
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 2.1.1
124
+ version: 2.1.3
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bosh_aws_cpi
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -193,19 +193,19 @@ dependencies:
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.0.0
195
195
  - !ruby/object:Gem::Dependency
196
- name: fog
196
+ name: fog-openstack
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 1.34.0
201
+ version: 0.1.7
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 1.34.0
208
+ version: 0.1.7
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: fog-aws
211
211
  requirement: !ruby/object:Gem::Requirement