fluent-plugin-openstack 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_swift.rb +11 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5893fb0c35a30f28c2e910a3d2726f3b0e422df195528c6310231cd4e713c9
|
4
|
+
data.tar.gz: 1727f303160bcbe2872b300f3d7f1e5220685bac915faffe15e0c2b7638d873a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dea4e5cf9472750fc688bf52c763ff849b8b827dae9f500ed0986de6c7b4f1a66985940e28dd0ad88b158cdd5dd4f594c326159c4bb23179eef1908d4f23d70
|
7
|
+
data.tar.gz: b91e91d61e552cde959e916c8077f377bd11b825bed736e8324a7ce068607bfa3b269e9df86159404bfd8996a9dbc81418c9276550023ea2da81926abd316055
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
@@ -70,7 +70,7 @@ module Fluent::Plugin
|
|
70
70
|
|
71
71
|
super
|
72
72
|
|
73
|
-
$log.
|
73
|
+
$log.warn("config: #{config}")
|
74
74
|
|
75
75
|
if auth_url.empty?
|
76
76
|
raise Fluent::ConfigError, 'auth_url parameter or OS_AUTH_URL variable not defined'
|
@@ -146,14 +146,15 @@ module Fluent::Plugin
|
|
146
146
|
time_slice = if metadata.timekey.nil?
|
147
147
|
''
|
148
148
|
else
|
149
|
-
$log.
|
150
|
-
$log.
|
149
|
+
$log.warn("timekey: #{metadata.timekey}")
|
150
|
+
$log.warn("metadata: #{metadata}")
|
151
151
|
time_slice_with_tz.call(metadata.timekey)
|
152
152
|
end
|
153
153
|
|
154
154
|
begin
|
155
|
-
|
156
|
-
$log.
|
155
|
+
puts("time_slice: #{time_slice}")
|
156
|
+
$log.warn("time_slice: #{time_slice}")
|
157
|
+
$log.warn("index_format: #{index_format}")
|
157
158
|
|
158
159
|
values_for_swift_object_chunk[chunk.unique_id] ||= {
|
159
160
|
'%{hex_random}' => hex_random(chunk: chunk)
|
@@ -167,7 +168,7 @@ module Fluent::Plugin
|
|
167
168
|
'%{index}' => format(index_format, i)
|
168
169
|
}.merge!(values_for_swift_object_chunk[chunk.unique_id])
|
169
170
|
|
170
|
-
$log.
|
171
|
+
$log.warn("values_for_swift_object_key_post: #{values_for_swift_object_key_post}")
|
171
172
|
|
172
173
|
if uuid_flush_enabled
|
173
174
|
values_for_swift_object_key_post['%{uuid_flush}'] = uuid_random
|
@@ -177,15 +178,15 @@ module Fluent::Plugin
|
|
177
178
|
values_for_swift_object_key_pre.fetch(matched_key, matched_key)
|
178
179
|
end
|
179
180
|
|
180
|
-
$log.
|
181
|
+
$log.warn("swift_path 1: #{swift_path}")
|
181
182
|
|
182
183
|
swift_path = extract_placeholders(swift_path, metadata)
|
183
184
|
|
184
|
-
$log.
|
185
|
+
$log.warn("swift_path 2: #{swift_path}")
|
185
186
|
|
186
187
|
swift_path = swift_path.gsub(/%{[^}]+}/, values_for_swift_object_key_post)
|
187
188
|
|
188
|
-
$log.
|
189
|
+
$log.warn("swift_path 3: #{swift_path}")
|
189
190
|
if i.positive? && (swift_path == previous_path)
|
190
191
|
if overwrite
|
191
192
|
log.warn("File: #{swift_path} already exists, but will overwrite!")
|
@@ -268,7 +269,7 @@ module Fluent::Plugin
|
|
268
269
|
storage.get_container(swift_container)
|
269
270
|
rescue Fog::OpenStack::Storage::NotFound
|
270
271
|
if auto_create_container
|
271
|
-
$log.
|
272
|
+
$log.warn("Creating container `#{swift_container}` on `#{auth_url}`, `#{swift_account}`.")
|
272
273
|
storage.put_container(swift_container)
|
273
274
|
else
|
274
275
|
raise "The specified container does not exist: #{swift_container}."
|