bosh-director 1.3058.0 → 1.3062.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: c403c5d66675e7c48fc2889983787878353c48c0
4
- data.tar.gz: a66dc4fc1ad04791f760dd3fab016afa3ebc9be7
3
+ metadata.gz: 01ea66f2c24b558f999ebe61e8a0b4f0322f5305
4
+ data.tar.gz: a35a06749fa6a70b66be4d0279bebd2cc1d54dd7
5
5
  SHA512:
6
- metadata.gz: 00a0bab638ca15afd65851d3498de43570fdccf5f5763f48f8a707e0652df488abd54e3b809fb2d2ed3680e35cfc73ea3c30bd38e0ad0bdc443eee532f804dc9
7
- data.tar.gz: a75700f1fdcfdfa294b42a7223b500017171d7651fd8e37a741ab9284bd249c1f36f8f1053000f1a92020c5790c64779399e87636873563d6a1365814581c531
6
+ metadata.gz: ec7cd4867f7a61bbd77e79f0d01ea9290f63343a26bc0382dbd15aa38ba5c3f53f5d5d901249955e77192d129cc4891a1d122c294549445635ddba8b2b746a25
7
+ data.tar.gz: 6ebead35e572a37a55d072576f44611a523c189e7f97a3140fdac8d860cdb2c27a59bab0a81c6ace39c49613d5b3e859838eafd5c0343b4032c564eb7f97170a
@@ -123,6 +123,18 @@ module Bosh::Director
123
123
  end
124
124
  end
125
125
 
126
+ def run_scripts(scripts_list, options)
127
+ begin
128
+ send_message(:run_scripts, scripts_list, options)
129
+ rescue RpcRemoteException => e
130
+ if e.message =~ /unknown message/
131
+ @logger.warn("Ignoring run_scripts 'unknown message' error from the agent: #{e.inspect}. Received while trying to run : #{scripts_list}")
132
+ else
133
+ raise
134
+ end
135
+ end
136
+ end
137
+
126
138
  def stop(*args)
127
139
  send_message(:stop, *args)
128
140
  end
@@ -69,7 +69,10 @@ module Bosh::Director
69
69
  }
70
70
  end
71
71
 
72
- steps << proc { start! if need_start? }
72
+ if need_start?
73
+ steps << proc { run_pre_start_scripts }
74
+ steps << proc { start! }
75
+ end
73
76
 
74
77
  steps << proc { wait_until_running }
75
78
 
@@ -115,6 +118,20 @@ module Bosh::Director
115
118
  end
116
119
  end
117
120
 
121
+ def run_pre_start_scripts
122
+ event_log.begin_stage('running pre-start scripts', 1)
123
+
124
+ pre_start_scripts_list = []
125
+ @instance.spec['job']['templates'].each do |template|
126
+ pre_start_scripts_list << "jobs/#{template['name']}/bin/pre-start"
127
+ end
128
+
129
+ event_log.track(@instance.spec['job']['name']) {
130
+ @agent.run_scripts(pre_start_scripts_list, {})
131
+ }
132
+
133
+ end
134
+
118
135
  def start!
119
136
  agent.start
120
137
  rescue RuntimeError => e
@@ -368,5 +385,9 @@ module Bosh::Director
368
385
  delete_mounted_disk(new_disk)
369
386
  raise
370
387
  end
388
+
389
+ def event_log
390
+ @event_log ||= Config.event_log
391
+ end
371
392
  end
372
393
  end
@@ -235,9 +235,13 @@ module Bosh::Director
235
235
  # We found a package with the same fingerprint but different
236
236
  # (release, name, version) tuple, so we need to make a copy
237
237
  # of the package blob and create a new db entry for it
238
- package = packages.first
239
- package_meta["blobstore_id"] = package.blobstore_id
240
- package_meta["sha1"] = package.sha1
238
+ packages.each do |package|
239
+ unless package.blobstore_id.nil?
240
+ package_meta["blobstore_id"] = package.blobstore_id
241
+ package_meta["sha1"] = package.sha1
242
+ break
243
+ end
244
+ end
241
245
  new_packages << package_meta
242
246
  end
243
247
  end
@@ -73,6 +73,7 @@ module Bosh::Director
73
73
 
74
74
  {
75
75
  :vm_cid => vm.cid,
76
+ :disk_cid => vm.instance ? vm.instance.persistent_disk_cid : nil,
76
77
  :ips => ips,
77
78
  :dns => dns_records.flatten,
78
79
  :agent_id => vm.agent_id,
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.3058.0'
3
+ VERSION = '1.3062.0'
4
4
  end
5
5
  end
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.3058.0
4
+ version: 1.3062.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt-ruby
@@ -30,126 +30,126 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3058.0
33
+ version: 1.3062.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.3058.0
40
+ version: 1.3062.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bosh-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3058.0
47
+ version: 1.3062.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.3058.0
54
+ version: 1.3062.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bosh-director-core
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3058.0
61
+ version: 1.3062.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.3058.0
68
+ version: 1.3062.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bosh_common
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3058.0
75
+ version: 1.3062.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.3058.0
82
+ version: 1.3062.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bosh-template
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3058.0
89
+ version: 1.3062.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.3058.0
96
+ version: 1.3062.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bosh_cpi
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3058.0
103
+ version: 1.3062.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.3058.0
110
+ version: 1.3062.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: 1.3058.0
117
+ version: 1.3062.0
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: 1.3058.0
124
+ version: 1.3062.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bosh_aws_cpi
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3058.0
131
+ version: 1.3062.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.3058.0
138
+ version: 1.3062.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: bosh_vsphere_cpi
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.3058.0
145
+ version: 1.3062.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.3058.0
152
+ version: 1.3062.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: bosh_vcloud_cpi
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -572,7 +572,7 @@ dependencies:
572
572
  version: '0'
573
573
  description: |-
574
574
  BOSH Director
575
- 7510f3
575
+ 704861
576
576
  email: support@cloudfoundry.com
577
577
  executables:
578
578
  - bosh-director