bosh-director 1.3140.0 → 1.3142.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: dd3559731e085dcd6ab97610fe9ea325c5eb1c87
4
- data.tar.gz: 4d5c3ffa8b7c72fb9a3569139ba3ad83d46172aa
3
+ metadata.gz: 1e4d91d058171cbe3356066d45bbfd796dd91b46
4
+ data.tar.gz: de156d03e44a2182f108501632c496df5a278c9f
5
5
  SHA512:
6
- metadata.gz: 465e5309751f8982d3ccaa2640a08d63d90ff33eb1b65550a2bc43fbd62fdd1d9e0fee136c945bfe1a544a382b373f4209148756d8391fd274928d9b57cc490a
7
- data.tar.gz: 51edf04e1f339f6db939fd2f43cc75ae83d796ee72a262e28542ba0fc79a12eba1546755903ab78b03c49852535e905bfd3bd310fea7d61844cc5ae813f19a27
6
+ metadata.gz: ff734f6d704461a8c14463e2eb1b2c0fecf6c2b913f863602a806b5e8793312c2860276d67f21b8e88b81024dd8d23a6d7134d1ed6a834e0c6dfb0f2e9b3bc4d
7
+ data.tar.gz: aeb50f8da45bd8d21e3e3defdb63cf84d11a002638efb1853d4142415e426dc30cd0f7a3ef04a4ff71d0183136c76b1d2c192addaa30fa853748f6decb8e9fd6
@@ -95,7 +95,7 @@ module Bosh::Director
95
95
  end
96
96
 
97
97
  def drain(*args)
98
- send_message(:drain, *args)
98
+ send_cancellable_message(:drain, *args)
99
99
  end
100
100
 
101
101
  def fetch_logs(*args)
@@ -306,6 +306,21 @@ module Bosh::Director
306
306
  end
307
307
  end
308
308
 
309
+ def send_cancellable_message(method_name, *args)
310
+ task = start_task(method_name, *args)
311
+ if task['agent_task_id']
312
+ begin
313
+ wait_for_task(task['agent_task_id']) { Config.job_cancelled? }
314
+ rescue TaskCancelled => e
315
+ cancel_task(task['agent_task_id'])
316
+ raise e
317
+ end
318
+ else
319
+ task['value']
320
+ end
321
+ end
322
+
323
+
309
324
  def start_task(method_name, *args)
310
325
  AgentMessageConverter.convert_old_message_to_new(handle_message_with_retry(method_name, *args))
311
326
  end
@@ -56,7 +56,6 @@ module Bosh::Director
56
56
  while drain_time < 0
57
57
  drain_time = drain_time.abs
58
58
  begin
59
- Config.job_cancelled?
60
59
  @logger.info("Drain - check back in #{drain_time} seconds")
61
60
  sleep(drain_time)
62
61
  drain_time = agent.drain("status")
@@ -48,9 +48,6 @@ module Bosh::Director
48
48
  drain_time = initial_drain_time
49
49
 
50
50
  loop do
51
- # This could go on forever if drain script is broken, canceling the task is a way out.
52
- @config.task_checkpoint
53
-
54
51
  wait_time = drain_time.abs
55
52
  if wait_time > 0
56
53
  @logger.info("`#{@instance}' is draining: checking back in #{wait_time}s")
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Director
3
- VERSION = '1.3140.0'
3
+ VERSION = '1.3142.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.3140.0
4
+ version: 1.3142.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-11-17 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_common
@@ -16,98 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3140.0
19
+ version: 1.3142.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.3140.0
26
+ version: 1.3142.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.3140.0
33
+ version: 1.3142.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.3140.0
40
+ version: 1.3142.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.3140.0
47
+ version: 1.3142.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.3140.0
54
+ version: 1.3142.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.3140.0
61
+ version: 1.3142.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.3140.0
68
+ version: 1.3142.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.3140.0
75
+ version: 1.3142.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.3140.0
82
+ version: 1.3142.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.3140.0
89
+ version: 1.3142.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.3140.0
96
+ version: 1.3142.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.3140.0
103
+ version: 1.3142.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.3140.0
110
+ version: 1.3142.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bosh_openstack_cpi
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 2.1.0
145
+ version: 2.2.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: 2.1.0
152
+ version: 2.2.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: bosh_vcloud_cpi
155
155
  requirement: !ruby/object:Gem::Requirement