bosh-director 1.2611.0 → 1.2619.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bosh-director-worker +2 -3
- data/lib/bosh/director.rb +1 -0
- data/lib/bosh/director/api/task_helper.rb +1 -1
- data/lib/bosh/director/config.rb +5 -5
- data/lib/bosh/director/deployment_plan/assembler.rb +29 -20
- data/lib/bosh/director/deployment_plan/deployment_spec_parser.rb +3 -2
- data/lib/bosh/director/deployment_plan/planner.rb +10 -4
- data/lib/bosh/director/deployment_plan/resource_pool.rb +28 -5
- data/lib/bosh/director/deployment_plan/updater.rb +6 -6
- data/lib/bosh/director/errand/job_manager.rb +16 -13
- data/lib/bosh/director/job_runner.rb +1 -1
- data/lib/bosh/director/jobs/run_errand.rb +9 -9
- data/lib/bosh/director/jobs/update_deployment.rb +1 -1
- data/lib/bosh/director/resource_pool_updater.rb +1 -0
- data/lib/bosh/director/version.rb +1 -1
- data/lib/cloud/dummy.rb +11 -6
- metadata +40 -24
data/bin/bosh-director-worker
CHANGED
@@ -52,10 +52,9 @@ end
|
|
52
52
|
Bosh::Director::App.new(config)
|
53
53
|
|
54
54
|
resque_logging = config.hash.fetch('resque', {}).fetch('logging', {})
|
55
|
-
resque_log_device = Logger::LogDevice.new(resque_logging.fetch('file', STDOUT))
|
56
55
|
resque_logger_level = resque_logging.fetch('level', 'info').upcase
|
57
|
-
Resque.logger =
|
58
|
-
Resque.logger.level =
|
56
|
+
Resque.logger = MonoLogger.new(resque_logging.fetch('file', STDOUT))
|
57
|
+
Resque.logger.level = MonoLogger.const_get(resque_logger_level)
|
59
58
|
|
60
59
|
worker = nil
|
61
60
|
queues = (ENV['QUEUES'] || ENV['QUEUE']).to_s.split(',')
|
data/lib/bosh/director.rb
CHANGED
@@ -15,7 +15,7 @@ module Bosh::Director
|
|
15
15
|
log_dir = File.join(Config.base_dir, "tasks", task.id.to_s)
|
16
16
|
task_status_file = File.join(log_dir, "debug")
|
17
17
|
FileUtils.mkdir_p(log_dir)
|
18
|
-
logger =
|
18
|
+
logger = MonoLogger.new(task_status_file)
|
19
19
|
logger.level = Config.logger.level
|
20
20
|
logger.info("Director Version : #{Bosh::Director::VERSION}")
|
21
21
|
logger.info("Enqueuing task: #{task.id}")
|
data/lib/bosh/director/config.rb
CHANGED
@@ -73,16 +73,16 @@ module Bosh::Director
|
|
73
73
|
@task_checkpoint_interval = 30
|
74
74
|
|
75
75
|
logging = config.fetch('logging', {})
|
76
|
-
@log_device =
|
77
|
-
@logger =
|
78
|
-
@logger.level =
|
76
|
+
@log_device = MonoLogger::LocklessLogDevice.new(logging.fetch('file', STDOUT))
|
77
|
+
@logger = MonoLogger.new(@log_device)
|
78
|
+
@logger.level = MonoLogger.const_get(logging.fetch('level', 'debug').upcase)
|
79
79
|
@logger.formatter = ThreadFormatter.new
|
80
80
|
|
81
81
|
# use a separate logger for redis to make it stfu
|
82
|
-
redis_logger =
|
82
|
+
redis_logger = MonoLogger.new(@log_device)
|
83
83
|
logging = config.fetch('redis', {}).fetch('logging', {})
|
84
84
|
redis_logger_level = logging.fetch('level', 'info').upcase
|
85
|
-
redis_logger.level =
|
85
|
+
redis_logger.level = MonoLogger.const_get(redis_logger_level)
|
86
86
|
|
87
87
|
# Event logger supposed to be overridden per task,
|
88
88
|
# the default one does nothing
|
@@ -51,24 +51,24 @@ module Bosh::Director
|
|
51
51
|
def bind_existing_vm(vm, lock)
|
52
52
|
state = get_state(vm)
|
53
53
|
lock.synchronize do
|
54
|
-
@logger.debug('Processing network reservations')
|
54
|
+
@logger.debug('Processing VM network reservations')
|
55
55
|
reservations = get_network_reservations(state)
|
56
56
|
|
57
57
|
instance = vm.instance
|
58
58
|
if instance
|
59
59
|
bind_instance(instance, state, reservations)
|
60
60
|
else
|
61
|
-
|
62
|
-
resource_pool = @deployment_plan.resource_pool(
|
63
|
-
state['resource_pool']['name'])
|
61
|
+
resource_pool_name = state['resource_pool']['name']
|
62
|
+
resource_pool = @deployment_plan.resource_pool(resource_pool_name)
|
64
63
|
if resource_pool
|
64
|
+
@logger.debug("Binding VM to resource pool '#{resource_pool_name}'")
|
65
65
|
bind_idle_vm(vm, resource_pool, state, reservations)
|
66
66
|
else
|
67
|
-
@logger.debug("Resource pool
|
67
|
+
@logger.debug("Resource pool '#{resource_pool_name}' does not exist, marking VM for deletion")
|
68
68
|
@deployment_plan.delete_vm(vm)
|
69
69
|
end
|
70
70
|
end
|
71
|
-
@logger.debug('Finished
|
71
|
+
@logger.debug('Finished processing VM network reservations')
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -78,20 +78,29 @@ module Bosh::Director
|
|
78
78
|
# @param [Hash] state VM state according to its agent
|
79
79
|
# @param [Hash] reservations Network reservations
|
80
80
|
def bind_idle_vm(vm, resource_pool, state, reservations)
|
81
|
-
|
81
|
+
if reservations.any? { |network_name, reservation| reservation.static? }
|
82
|
+
@logger.debug("Releasing all network reservations for VM `#{vm.cid}'")
|
83
|
+
reservations.each do |network_name, reservation|
|
84
|
+
@logger.debug("Releasing #{reservation.type} network reservation `#{network_name}' for VM `#{vm.cid}'")
|
85
|
+
resource_pool.network.release(reservation)
|
86
|
+
end
|
87
|
+
|
88
|
+
@logger.debug("Deleting VM `#{vm.cid}' with static network reservation")
|
89
|
+
@deployment_plan.delete_vm(vm)
|
90
|
+
return
|
91
|
+
end
|
92
|
+
|
93
|
+
@logger.debug("Adding VM `#{vm.cid}' to resource pool `#{resource_pool.name}'")
|
82
94
|
idle_vm = resource_pool.add_idle_vm
|
83
95
|
idle_vm.vm = vm
|
84
96
|
idle_vm.current_state = state
|
85
97
|
|
86
|
-
|
98
|
+
network_name = resource_pool.network.name
|
99
|
+
reservation = reservations[network_name]
|
87
100
|
if reservation
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
resource_pool.network.release(reservation)
|
92
|
-
else
|
93
|
-
idle_vm.use_reservation(reservation)
|
94
|
-
end
|
101
|
+
@logger.debug("Using existing `#{reservation.type}' " +
|
102
|
+
"network reservation of `#{reservation.ip}' for VM `#{vm.cid}'")
|
103
|
+
idle_vm.use_reservation(reservation)
|
95
104
|
else
|
96
105
|
@logger.debug("No network reservation for VM `#{vm.cid}'")
|
97
106
|
end
|
@@ -118,26 +127,26 @@ module Bosh::Director
|
|
118
127
|
|
119
128
|
job = @deployment_plan.job(instance_model.job)
|
120
129
|
unless job
|
121
|
-
@logger.debug("Job
|
130
|
+
@logger.debug("Job `#{instance_model.job}' not found, marking for deletion")
|
122
131
|
@deployment_plan.delete_instance(instance_model)
|
123
132
|
return
|
124
133
|
end
|
125
134
|
|
126
135
|
instance = job.instance(instance_model.index)
|
127
136
|
unless instance
|
128
|
-
@logger.debug("Job instance
|
137
|
+
@logger.debug("Job instance `#{instance_name}' not found, marking for deletion")
|
129
138
|
@deployment_plan.delete_instance(instance_model)
|
130
139
|
return
|
131
140
|
end
|
132
141
|
|
133
|
-
@logger.debug("Found job instance
|
142
|
+
@logger.debug("Found job instance `#{instance_name}'")
|
134
143
|
instance.use_model(instance_model)
|
135
144
|
instance.current_state = state
|
136
145
|
|
137
|
-
@logger.debug("Copying job instance
|
146
|
+
@logger.debug("Copying job instance `#{instance_name}' network reservations")
|
138
147
|
instance.take_network_reservations(reservations)
|
139
148
|
|
140
|
-
@logger.debug("Copying job instance
|
149
|
+
@logger.debug("Copying job instance `#{instance_name}' resource pool reservation")
|
141
150
|
job.resource_pool.mark_active_vm
|
142
151
|
end
|
143
152
|
|
@@ -6,8 +6,9 @@ module Bosh::Director
|
|
6
6
|
include DnsHelper
|
7
7
|
include ValidationHelper
|
8
8
|
|
9
|
-
def initialize(event_log)
|
9
|
+
def initialize(event_log, logger)
|
10
10
|
@event_log = event_log
|
11
|
+
@logger = logger
|
11
12
|
end
|
12
13
|
|
13
14
|
# @param [Hash] manifest Raw deployment manifest
|
@@ -102,7 +103,7 @@ module Bosh::Director
|
|
102
103
|
def parse_resource_pools
|
103
104
|
resource_pools = safe_property(@manifest, 'resource_pools', :class => Array)
|
104
105
|
resource_pools.each do |rp_spec|
|
105
|
-
@deployment.add_resource_pool(ResourcePool.new(@deployment, rp_spec))
|
106
|
+
@deployment.add_resource_pool(ResourcePool.new(@deployment, rp_spec, @logger))
|
106
107
|
end
|
107
108
|
|
108
109
|
# Uncomment when integration test fixed
|
@@ -31,8 +31,12 @@ module Bosh::Director
|
|
31
31
|
# All jobs in the deployment
|
32
32
|
attr_reader :jobs
|
33
33
|
|
34
|
+
# Job instances from the old manifest that are not in the new manifest
|
34
35
|
attr_accessor :unneeded_instances
|
36
|
+
|
37
|
+
# VMs from the old manifest that are not in the new manifest
|
35
38
|
attr_accessor :unneeded_vms
|
39
|
+
|
36
40
|
attr_accessor :dns_domain
|
37
41
|
|
38
42
|
attr_reader :job_rename
|
@@ -41,13 +45,15 @@ module Bosh::Director
|
|
41
45
|
attr_reader :recreate
|
42
46
|
|
43
47
|
# @param [Hash] manifest Raw deployment manifest
|
44
|
-
# @param [Bosh::Director::EventLog::Log]
|
45
|
-
# event_log Event log for recording deprecations
|
46
48
|
# @param [Hash] options Additional options for deployment
|
47
49
|
# (e.g. job_states, job_rename)
|
50
|
+
# @param [Bosh::Director::EventLog::Log]
|
51
|
+
# event_log Event log for recording deprecations
|
52
|
+
# @param [Logger]
|
53
|
+
# logger Log for director logging
|
48
54
|
# @return [Bosh::Director::DeploymentPlan::Planner]
|
49
|
-
def self.parse(manifest, event_log,
|
50
|
-
parser = DeploymentSpecParser.new(event_log)
|
55
|
+
def self.parse(manifest, options, event_log, logger)
|
56
|
+
parser = DeploymentSpecParser.new(event_log, logger)
|
51
57
|
parser.parse(manifest, options)
|
52
58
|
end
|
53
59
|
|
@@ -40,11 +40,14 @@ module Bosh::Director
|
|
40
40
|
|
41
41
|
# @param [DeploymentPlan] deployment_plan Deployment plan
|
42
42
|
# @param [Hash] spec Raw resource pool spec from the deployment manifest
|
43
|
-
|
43
|
+
# @param [Logger] logger Director logger
|
44
|
+
def initialize(deployment_plan, spec, logger)
|
44
45
|
@deployment_plan = deployment_plan
|
45
46
|
|
47
|
+
@logger = logger
|
48
|
+
|
46
49
|
@name = safe_property(spec, "name", :class => String)
|
47
|
-
@size = safe_property(spec, "size", :class => Integer)
|
50
|
+
@size = safe_property(spec, "size", :class => Integer, :optional => true)
|
48
51
|
|
49
52
|
@cloud_properties =
|
50
53
|
safe_property(spec, "cloud_properties", :class => Hash)
|
@@ -112,6 +115,14 @@ module Bosh::Director
|
|
112
115
|
end
|
113
116
|
|
114
117
|
def allocate_vm
|
118
|
+
if @idle_vms.empty?
|
119
|
+
if dynamically_sized?
|
120
|
+
add_idle_vm
|
121
|
+
else
|
122
|
+
raise ResourcePoolNotEnoughCapacity,
|
123
|
+
"Resource pool `#{@name}' has no more VMs to allocate"
|
124
|
+
end
|
125
|
+
end
|
115
126
|
allocated_vm = @idle_vms.pop
|
116
127
|
@allocated_vms << allocated_vm
|
117
128
|
allocated_vm
|
@@ -119,9 +130,16 @@ module Bosh::Director
|
|
119
130
|
|
120
131
|
def deallocate_vm(idle_vm_cid)
|
121
132
|
deallocated_vm = @allocated_vms.find { |idle_vm| idle_vm.vm.cid == idle_vm_cid }
|
133
|
+
if deallocated_vm.nil?
|
134
|
+
raise DirectorError, "Resource pool `#{@name}' does not contain an allocated VM with the cid `#{idle_vm_cid}'"
|
135
|
+
end
|
136
|
+
|
137
|
+
@logger.info("Deallocating VM: #{deallocated_vm.vm.cid}")
|
122
138
|
@allocated_vms.delete(deallocated_vm)
|
123
|
-
|
124
|
-
|
139
|
+
|
140
|
+
add_idle_vm unless dynamically_sized? # don't refill if dynamically sized
|
141
|
+
|
142
|
+
nil
|
125
143
|
end
|
126
144
|
|
127
145
|
# "Active" VM is a VM that is currently running a job
|
@@ -136,7 +154,7 @@ module Bosh::Director
|
|
136
154
|
# @return [void]
|
137
155
|
def reserve_capacity(n)
|
138
156
|
needed = @reserved_capacity + n
|
139
|
-
if needed > @size
|
157
|
+
if !dynamically_sized? && needed > @size
|
140
158
|
raise ResourcePoolNotEnoughCapacity,
|
141
159
|
"Resource pool `#{@name}' is not big enough: " +
|
142
160
|
"#{needed} VMs needed, capacity is #{@size}"
|
@@ -159,12 +177,17 @@ module Bosh::Director
|
|
159
177
|
end
|
160
178
|
end
|
161
179
|
|
180
|
+
def dynamically_sized?
|
181
|
+
@size.nil?
|
182
|
+
end
|
183
|
+
|
162
184
|
private
|
163
185
|
|
164
186
|
# Returns a number of VMs that need to be created in order to bring
|
165
187
|
# this resource pool to a desired size
|
166
188
|
# @return [Integer]
|
167
189
|
def missing_vm_count
|
190
|
+
return 0 if dynamically_sized?
|
168
191
|
@size - @active_vm_count - @idle_vms.size
|
169
192
|
end
|
170
193
|
end
|
@@ -17,6 +17,12 @@ module Bosh::Director
|
|
17
17
|
@assembler.bind_dns
|
18
18
|
end
|
19
19
|
|
20
|
+
@logger.info('Deleting no longer needed VMs')
|
21
|
+
@assembler.delete_unneeded_vms
|
22
|
+
|
23
|
+
@logger.info('Deleting no longer needed instances')
|
24
|
+
@assembler.delete_unneeded_instances
|
25
|
+
|
20
26
|
@logger.info('Updating resource pools')
|
21
27
|
@resource_pools.update
|
22
28
|
@base_job.task_checkpoint
|
@@ -29,12 +35,6 @@ module Bosh::Director
|
|
29
35
|
@assembler.bind_configuration
|
30
36
|
end
|
31
37
|
|
32
|
-
@logger.info('Deleting no longer needed VMs')
|
33
|
-
@assembler.delete_unneeded_vms
|
34
|
-
|
35
|
-
@logger.info('Deleting no longer needed instances')
|
36
|
-
@assembler.delete_unneeded_instances
|
37
|
-
|
38
38
|
@logger.info('Updating jobs')
|
39
39
|
@multi_job_updater.run(
|
40
40
|
@base_job,
|
@@ -4,14 +4,16 @@ module Bosh::Director
|
|
4
4
|
# @param [Bosh::Director::DeploymentPlan::Job] job
|
5
5
|
# @param [Bosh::Blobstore::Client] blobstore
|
6
6
|
# @param [Bosh::Director::EventLog::Log] event_log
|
7
|
-
|
7
|
+
# @param [Logger] logger
|
8
|
+
def initialize(deployment, job, blobstore, event_log, logger)
|
8
9
|
@deployment = deployment
|
9
10
|
@job = job
|
10
11
|
@blobstore = blobstore
|
11
12
|
@event_log = event_log
|
13
|
+
@logger = logger
|
12
14
|
end
|
13
15
|
|
14
|
-
# Creates/updates all job instances
|
16
|
+
# Creates/updates all errand job instances
|
15
17
|
# @return [void]
|
16
18
|
def update_instances
|
17
19
|
dns_binder = DeploymentPlan::DnsBinder.new(@deployment)
|
@@ -27,15 +29,17 @@ module Bosh::Director
|
|
27
29
|
job_updater.update
|
28
30
|
end
|
29
31
|
|
30
|
-
# Deletes
|
32
|
+
# Deletes all errand job instances
|
31
33
|
# @return [void]
|
32
34
|
def delete_instances
|
33
35
|
instances = @job.instances.map(&:model).compact
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
if instances.empty?
|
37
|
+
@logger.info('No errand instances to delete')
|
38
|
+
return
|
39
|
+
end
|
38
40
|
|
41
|
+
@logger.info('Deleting errand instances')
|
42
|
+
event_log_stage = @event_log.begin_stage('Deleting errand instances', instances.size, [@job.name])
|
39
43
|
instance_deleter = InstanceDeleter.new(@deployment)
|
40
44
|
instance_deleter.delete_instances(instances, event_log_stage)
|
41
45
|
|
@@ -44,13 +48,12 @@ module Bosh::Director
|
|
44
48
|
|
45
49
|
private
|
46
50
|
|
51
|
+
# Deallocates all errand VMs
|
52
|
+
# @return [void]
|
47
53
|
def deallocate_vms
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
idle_vm = @job.resource_pool.deallocate_vm(cid)
|
52
|
-
idle_vm.clean_vm
|
53
|
-
end
|
54
|
+
@logger.info('Deallocating errand VMs')
|
55
|
+
instance_vm_cids = @job.instances.map { |i| i.model.vm.cid }
|
56
|
+
instance_vm_cids.each { |cid| @job.resource_pool.deallocate_vm(cid) }
|
54
57
|
end
|
55
58
|
end
|
56
59
|
end
|
@@ -53,7 +53,7 @@ module Bosh::Director
|
|
53
53
|
event_log = File.join(log_dir, 'event')
|
54
54
|
result_log = File.join(log_dir, 'result')
|
55
55
|
|
56
|
-
@task_logger =
|
56
|
+
@task_logger = MonoLogger.new(debug_log)
|
57
57
|
@task_logger.level = Config.logger.level
|
58
58
|
@task_logger.formatter = ThreadFormatter.new
|
59
59
|
|
@@ -24,7 +24,7 @@ module Bosh::Director
|
|
24
24
|
def perform
|
25
25
|
deployment_model = @deployment_manager.find_by_name(@deployment_name)
|
26
26
|
manifest = Psych.load(deployment_model.manifest)
|
27
|
-
deployment = DeploymentPlan::Planner.parse(manifest, event_log,
|
27
|
+
deployment = DeploymentPlan::Planner.parse(manifest, {}, event_log, logger)
|
28
28
|
|
29
29
|
job = deployment.job(@errand_name)
|
30
30
|
if job.nil?
|
@@ -70,38 +70,38 @@ module Bosh::Director
|
|
70
70
|
deployment_preparer = Errand::DeploymentPreparer.new(deployment, job, event_log, self)
|
71
71
|
|
72
72
|
rp_updaters = [ResourcePoolUpdater.new(job.resource_pool)]
|
73
|
-
|
73
|
+
resource_pools = DeploymentPlan::ResourcePools.new(event_log, rp_updaters)
|
74
74
|
|
75
|
-
job_manager = Errand::JobManager.new(deployment, job, @blobstore, event_log)
|
75
|
+
job_manager = Errand::JobManager.new(deployment, job, @blobstore, event_log, logger)
|
76
76
|
|
77
77
|
begin
|
78
|
-
update_instances(deployment_preparer,
|
78
|
+
update_instances(deployment_preparer, resource_pools, job_manager)
|
79
79
|
blk.call
|
80
80
|
ensure
|
81
|
-
delete_instances(
|
81
|
+
delete_instances(resource_pools, job_manager)
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
def update_instances(deployment_preparer,
|
85
|
+
def update_instances(deployment_preparer, resource_pools, job_manager)
|
86
86
|
logger.info('Starting to prepare for deployment')
|
87
87
|
deployment_preparer.prepare_deployment
|
88
88
|
deployment_preparer.prepare_job
|
89
89
|
|
90
90
|
logger.info('Starting to update resource pool')
|
91
|
-
|
91
|
+
resource_pools.update
|
92
92
|
|
93
93
|
logger.info('Starting to update job instances')
|
94
94
|
job_manager.update_instances
|
95
95
|
end
|
96
96
|
|
97
|
-
def delete_instances(
|
97
|
+
def delete_instances(resource_pools, job_manager)
|
98
98
|
@ignore_cancellation = true
|
99
99
|
|
100
100
|
logger.info('Starting to delete job instances')
|
101
101
|
job_manager.delete_instances
|
102
102
|
|
103
103
|
logger.info('Starting to refill resource pool')
|
104
|
-
|
104
|
+
resource_pools.refill
|
105
105
|
|
106
106
|
@ignore_cancellation = false
|
107
107
|
end
|
@@ -29,7 +29,7 @@ module Bosh::Director
|
|
29
29
|
}
|
30
30
|
|
31
31
|
manifest_as_hash = Psych.load(@manifest)
|
32
|
-
@deployment_plan = DeploymentPlan::Planner.parse(manifest_as_hash, event_log,
|
32
|
+
@deployment_plan = DeploymentPlan::Planner.parse(manifest_as_hash, plan_options, event_log, logger)
|
33
33
|
logger.info('Created deployment plan')
|
34
34
|
|
35
35
|
resource_pools = @deployment_plan.resource_pools
|
data/lib/cloud/dummy.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'digest/sha1'
|
2
2
|
require 'fileutils'
|
3
3
|
require 'securerandom'
|
4
|
-
require '
|
4
|
+
require 'mono_logger'
|
5
5
|
|
6
6
|
module Bosh
|
7
7
|
module Clouds
|
@@ -25,7 +25,7 @@ module Bosh
|
|
25
25
|
|
26
26
|
@running_vms_dir = File.join(@base_dir, 'running_vms')
|
27
27
|
|
28
|
-
@logger =
|
28
|
+
@logger = MonoLogger.new(options['log_device'] || STDOUT)
|
29
29
|
|
30
30
|
@commands = CommandTransport.new(@base_dir, @logger)
|
31
31
|
|
@@ -91,8 +91,13 @@ module Bosh
|
|
91
91
|
|
92
92
|
def configure_networks(vm_id, networks)
|
93
93
|
cmd = commands.next_configure_networks_cmd(vm_id)
|
94
|
-
|
95
|
-
|
94
|
+
|
95
|
+
# The only configure_networks test so far only tests the negative case.
|
96
|
+
# If a positive case is added, the agent will need to be re-started.
|
97
|
+
# Normally runit would handle that.
|
98
|
+
if cmd.not_supported || true
|
99
|
+
raise NotSupported, 'Dummy CPI was configured to return NotSupported'
|
100
|
+
end
|
96
101
|
end
|
97
102
|
|
98
103
|
def attach_disk(vm_id, disk_id)
|
@@ -278,12 +283,12 @@ module Bosh
|
|
278
283
|
@logger.info('Reading create_vm configuration')
|
279
284
|
always_path = File.join(@cpi_commands, 'create_vm', 'always')
|
280
285
|
ip_address = File.read(always_path) if File.exists?(always_path)
|
281
|
-
|
286
|
+
CreateVmCommand.new(ip_address)
|
282
287
|
end
|
283
288
|
end
|
284
289
|
|
285
290
|
class ConfigureNetworksCommand < Struct.new(:not_supported); end
|
286
|
-
class
|
291
|
+
class CreateVmCommand < Struct.new(:ip_address); end
|
287
292
|
end
|
288
293
|
end
|
289
294
|
end
|
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.
|
4
|
+
version: 1.2619.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-06-
|
12
|
+
date: 2014-06-26 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.
|
37
|
+
version: 1.2619.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.
|
45
|
+
version: 1.2619.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.
|
53
|
+
version: 1.2619.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.
|
61
|
+
version: 1.2619.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: bosh-director-core
|
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.
|
69
|
+
version: 1.2619.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.
|
77
|
+
version: 1.2619.0
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: bosh_common
|
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.
|
85
|
+
version: 1.2619.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.
|
93
|
+
version: 1.2619.0
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: bosh_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.
|
101
|
+
version: 1.2619.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.
|
109
|
+
version: 1.2619.0
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: bosh_openstack_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.
|
117
|
+
version: 1.2619.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.
|
125
|
+
version: 1.2619.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: bosh_aws_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.
|
133
|
+
version: 1.2619.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.
|
141
|
+
version: 1.2619.0
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: bosh_vsphere_cpi
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ~>
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 1.
|
149
|
+
version: 1.2619.0
|
150
150
|
type: :runtime
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -154,7 +154,7 @@ dependencies:
|
|
154
154
|
requirements:
|
155
155
|
- - ~>
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 1.
|
157
|
+
version: 1.2619.0
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: bosh_warden_cpi
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,7 +162,7 @@ dependencies:
|
|
162
162
|
requirements:
|
163
163
|
- - ~>
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 1.
|
165
|
+
version: 1.2619.0
|
166
166
|
type: :runtime
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -170,7 +170,7 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - ~>
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.2619.0
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: bosh_vcloud_cpi
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,6 +235,22 @@ dependencies:
|
|
235
235
|
- - '='
|
236
236
|
- !ruby/object:Gem::Version
|
237
237
|
version: 2.2.4
|
238
|
+
- !ruby/object:Gem::Dependency
|
239
|
+
name: mono_logger
|
240
|
+
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ~>
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: 1.1.0
|
246
|
+
type: :runtime
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
250
|
+
requirements:
|
251
|
+
- - ~>
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: 1.1.0
|
238
254
|
- !ruby/object:Gem::Dependency
|
239
255
|
name: nats
|
240
256
|
requirement: !ruby/object:Gem::Requirement
|
@@ -322,7 +338,7 @@ dependencies:
|
|
322
338
|
requirements:
|
323
339
|
- - ~>
|
324
340
|
- !ruby/object:Gem::Version
|
325
|
-
version: 1.
|
341
|
+
version: 1.25.0
|
326
342
|
type: :runtime
|
327
343
|
prerelease: false
|
328
344
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -330,7 +346,7 @@ dependencies:
|
|
330
346
|
requirements:
|
331
347
|
- - ~>
|
332
348
|
- !ruby/object:Gem::Version
|
333
|
-
version: 1.
|
349
|
+
version: 1.25.0
|
334
350
|
- !ruby/object:Gem::Dependency
|
335
351
|
name: resque-backtrace
|
336
352
|
requirement: !ruby/object:Gem::Requirement
|
@@ -493,7 +509,7 @@ dependencies:
|
|
493
509
|
version: '0'
|
494
510
|
description: ! 'BOSH Director
|
495
511
|
|
496
|
-
|
512
|
+
a38edb'
|
497
513
|
email: support@cloudfoundry.com
|
498
514
|
executables:
|
499
515
|
- bosh-director
|
@@ -754,7 +770,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
754
770
|
version: '0'
|
755
771
|
segments:
|
756
772
|
- 0
|
757
|
-
hash: -
|
773
|
+
hash: -2708480471074860052
|
758
774
|
requirements: []
|
759
775
|
rubyforge_project:
|
760
776
|
rubygems_version: 1.8.23.2
|