bosh-director 1.2754.0 → 1.2765.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bosh-director-worker +1 -7
- data/lib/bosh/director/api/controllers/releases_controller.rb +9 -4
- data/lib/bosh/director/api/release_manager.rb +3 -4
- data/lib/bosh/director/cloudcheck_helper.rb +0 -6
- data/lib/bosh/director/jobs/update_release.rb +5 -0
- data/lib/bosh/director/version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28b41e6e8624feb1a4f8a3bbe654cc84f45b0d96
|
4
|
+
data.tar.gz: ed9766fc92fbdc0138263f78c5bac488b575f4da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138ceba28cc653b1a64e475b6d5078e2aadcf28422e7272474b5b210ff050b36616a7e8455033569605fd35d5f888168d9227704f5523628d58f888576c72e1e
|
7
|
+
data.tar.gz: a309f8c84ef1a431ee83af55b5c547dcf020fe6c279b352798eebf80a6ef26d6d49b5c860fd4c0867eb5bb5dfa36693953bb4b6f9859257d5a8656ff7c478ce3
|
data/bin/bosh-director-worker
CHANGED
@@ -68,13 +68,7 @@ end
|
|
68
68
|
|
69
69
|
Resque.after_fork do
|
70
70
|
EM.error_handler { |e| puts "Error raised during event loop: #{e.inspect}, backtrace: #{e.backtrace}" }
|
71
|
-
Thread.new
|
72
|
-
EM.run do
|
73
|
-
# connect to NATS on EM thread
|
74
|
-
# EM::connect will throw unbound errors if run from a different thread.
|
75
|
-
Bosh::Director::Config.nats
|
76
|
-
end
|
77
|
-
end
|
71
|
+
Thread.new { EM.run }
|
78
72
|
end
|
79
73
|
|
80
74
|
Resque::Failure.backend = Resque::Failure::Backtrace
|
@@ -5,14 +5,19 @@ module Bosh::Director
|
|
5
5
|
class ReleasesController < BaseController
|
6
6
|
post '/', :consumes => :json do
|
7
7
|
payload = json_decode(request.body)
|
8
|
-
|
9
|
-
|
8
|
+
options = {
|
9
|
+
rebase: params['rebase'] == 'true',
|
10
|
+
skip_if_exists: params['skip_if_exists'] == 'true',
|
11
|
+
}
|
12
|
+
task = @release_manager.create_release_from_url(@user, payload['location'], options)
|
10
13
|
redirect "/tasks/#{task.id}"
|
11
14
|
end
|
12
15
|
|
13
16
|
post '/', :consumes => :multipart do
|
14
|
-
|
15
|
-
|
17
|
+
options = {
|
18
|
+
rebase: params['rebase'] == 'true',
|
19
|
+
}
|
20
|
+
task = @release_manager.create_release_from_file_path(@user, params[:nginx_upload_path], options)
|
16
21
|
redirect "/tasks/#{task.id}"
|
17
22
|
end
|
18
23
|
|
@@ -46,17 +46,16 @@ module Bosh::Director
|
|
46
46
|
release_version
|
47
47
|
end
|
48
48
|
|
49
|
-
def create_release_from_url(user, release_url,
|
50
|
-
options =
|
49
|
+
def create_release_from_url(user, release_url, options)
|
50
|
+
options[:remote] = true
|
51
51
|
JobQueue.new.enqueue(user, Jobs::UpdateRelease, 'create release', [release_url, options])
|
52
52
|
end
|
53
53
|
|
54
|
-
def create_release_from_file_path(user, release_path,
|
54
|
+
def create_release_from_file_path(user, release_path, options)
|
55
55
|
unless File.exists?(release_path)
|
56
56
|
raise DirectorError, "Failed to create release: file not found - #{release_path}"
|
57
57
|
end
|
58
58
|
|
59
|
-
options = { rebase: rebase }
|
60
59
|
JobQueue.new.enqueue(user, Jobs::UpdateRelease, 'create release', [release_path, options])
|
61
60
|
end
|
62
61
|
|
@@ -100,12 +100,6 @@ module Bosh::Director
|
|
100
100
|
instance = vm.instance
|
101
101
|
disk_cid = instance ? instance.persistent_disk_cid : nil
|
102
102
|
|
103
|
-
begin
|
104
|
-
cloud.detach_disk(vm.cid, disk_cid) if disk_cid
|
105
|
-
rescue Bosh::Clouds::DiskNotAttached
|
106
|
-
@logger.warn("Disk cid '#{disk_cid}' detected, but the disk is already detached")
|
107
|
-
end
|
108
|
-
|
109
103
|
# One situation where this handler is actually useful is when
|
110
104
|
# VM has already been deleted but something failed after that
|
111
105
|
# and it is still referenced in DB. In that case it makes sense
|
@@ -31,6 +31,7 @@ module Bosh::Director
|
|
31
31
|
@release_version_model = nil
|
32
32
|
|
33
33
|
@rebase = !!options['rebase']
|
34
|
+
@skip_if_exists = !!options['skip_if_exists']
|
34
35
|
|
35
36
|
@manifest = nil
|
36
37
|
@name = nil
|
@@ -138,6 +139,10 @@ module Bosh::Director
|
|
138
139
|
if @release_version_model.errors[:version] == [:format]
|
139
140
|
raise ReleaseVersionInvalid,
|
140
141
|
"Release version invalid `#{@name}/#{@version}'"
|
142
|
+
elsif @skip_if_exists
|
143
|
+
event_log.begin_stage("Release already exists", 1)
|
144
|
+
event_log.track("#{@name}/#{@version}") {}
|
145
|
+
return
|
141
146
|
else
|
142
147
|
raise ReleaseAlreadyExists,
|
143
148
|
"Release `#{@name}/#{@version}' already exists"
|
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.
|
4
|
+
version: 1.2765.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt-ruby
|
@@ -30,140 +30,140 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.2765.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.
|
40
|
+
version: 1.2765.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.
|
47
|
+
version: 1.2765.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.
|
54
|
+
version: 1.2765.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.
|
61
|
+
version: 1.2765.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.
|
68
|
+
version: 1.2765.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.
|
75
|
+
version: 1.2765.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.
|
82
|
+
version: 1.2765.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.
|
89
|
+
version: 1.2765.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.
|
96
|
+
version: 1.2765.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.
|
103
|
+
version: 1.2765.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.
|
110
|
+
version: 1.2765.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.
|
117
|
+
version: 1.2765.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.
|
124
|
+
version: 1.2765.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.
|
131
|
+
version: 1.2765.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.
|
138
|
+
version: 1.2765.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.
|
145
|
+
version: 1.2765.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.
|
152
|
+
version: 1.2765.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: bosh_warden_cpi
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.2765.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.2765.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: bosh_vcloud_cpi
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -460,7 +460,7 @@ dependencies:
|
|
460
460
|
version: '0'
|
461
461
|
description: |-
|
462
462
|
BOSH Director
|
463
|
-
|
463
|
+
ae0a5a
|
464
464
|
email: support@cloudfoundry.com
|
465
465
|
executables:
|
466
466
|
- bosh-director
|