docker-registry-sync 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/docker/registry/sync/cmd.rb +3 -1
- data/lib/docker/registry/sync/s3.rb +9 -8
- data/lib/docker/registry/sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTFmYmM3YTUyNzBlZWU1NTYzNWJmOTlkMWM3MmE4NGFmYzQzMTcxYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTA1MjY5Mjk4ZDRmY2FjNzllNDhiZmI2ZWQwMGU3OWU5MDM5NzZhYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Njk5YmU1MTY0MDFiMzMwNjU2NDI5ZWQzM2I2Mzc4YmIxNWQ2ODE4NDRmYTc1
|
10
|
+
NWI1NDk2YmYyMTI4OGZjZDAwMWJhMTkzYWQ4ZTYwZmEwMWRiZDE1MzBiNjNm
|
11
|
+
MzAwMThkN2NjNjViZDE1MTM3ZGEwNDJjYjdkNjRlZTE3M2U5YzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDViMDc2MjA2NmE3NzJkYzhiOTFlZmVlYTUyMWViZGY2NzBlZTQ1NjE2MWM2
|
14
|
+
Nzc3ZWZjZjFmNDk4ZWI3YWUzOWE0NGZhNmUwZTlhNDI2OWYxMTJhNzUxY2M3
|
15
|
+
MGQwZDM1Mzg3ZDI4OWE4NmIxNGQyY2FiYWZiZTRhZjZkNGY5ZDM=
|
@@ -52,11 +52,13 @@ module Docker
|
|
52
52
|
@config.logger.error 'Received INT signal...'
|
53
53
|
@producer_finished = true
|
54
54
|
@terminated = true
|
55
|
+
@work_queue.clear
|
55
56
|
end
|
56
57
|
Signal.trap('TERM') do
|
57
58
|
@config.logger.error 'Received TERM signal...'
|
58
59
|
@producer_finished = true
|
59
60
|
@terminated = true
|
61
|
+
@work_queue.clear
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
@@ -171,7 +173,7 @@ module Docker
|
|
171
173
|
end
|
172
174
|
ec = 0
|
173
175
|
sleep @config.empty_queue_sleep_time unless @terminated
|
174
|
-
rescue
|
176
|
+
rescue => e
|
175
177
|
@config.logger.error "An unknown error occurred while monitoring queue: #{e}"
|
176
178
|
@config.logger.error e.traceback
|
177
179
|
@config.logger.error 'Exiting...'
|
@@ -34,7 +34,7 @@ module Docker
|
|
34
34
|
|
35
35
|
img_id = s3_source.get_object(bucket: source_bucket, key: "registry/repositories/#{image}/tag_#{tag}").body.read
|
36
36
|
sync_image(img_id, bucket, region, sse, source_bucket, source_region)
|
37
|
-
rescue
|
37
|
+
rescue => e
|
38
38
|
@config.logger.error "An unexpected error occoured while syncing tag #{image}:#{tag}: #{e}"
|
39
39
|
@config.logger.error e.backtrace
|
40
40
|
false
|
@@ -57,7 +57,7 @@ module Docker
|
|
57
57
|
JSON.load(img_index_resp.body.read).each do |image|
|
58
58
|
sync_image(image['id'], bucket, region, sse, source_bucket, source_region)
|
59
59
|
end
|
60
|
-
rescue
|
60
|
+
rescue => e
|
61
61
|
@config.logger.error "An unexpected error occoured while syncing repo #{repo}: #{e}"
|
62
62
|
@config.logger.error e.backtrace
|
63
63
|
false
|
@@ -147,15 +147,16 @@ module Docker
|
|
147
147
|
begin
|
148
148
|
target_client.copy_object(opts)
|
149
149
|
success = true
|
150
|
-
|
150
|
+
@config.logger.info "Worker finished syncing key: #{opts[:key]}"
|
151
|
+
rescue => e
|
151
152
|
@config.logger.error "An unknown error occoured while copying object in s3: #{e}"
|
152
153
|
@config.logger.error e.backtrace
|
154
|
+
ensure
|
155
|
+
Thread.current['finished'] = true
|
156
|
+
@threads.synchronize do
|
157
|
+
@status_queue << success
|
158
|
+
end
|
153
159
|
end
|
154
|
-
Thread.current['finished'] = true
|
155
|
-
@threads.synchronize do
|
156
|
-
@status_queue << success
|
157
|
-
end
|
158
|
-
@config.logger.info "Worker finished syncing key: #{opts[:key]}"
|
159
160
|
end
|
160
161
|
else
|
161
162
|
@config.logger.info "Queued work empty: #{opts}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-registry-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Oldfield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|