fluent-plugin-azurestorage-gen2 0.2.4 → 0.2.5

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: 04eea9a39f7cc1d5533d895d6efd3aa725cd9c44
4
- data.tar.gz: 0c3779b86a040e07924c0e7d4f78a01cee9ac274
3
+ metadata.gz: 02170d63c314b7bb91fb1722b0ca1a4dccad9bd0
4
+ data.tar.gz: 7fc221dc0be643681800be67c954634caa7df518
5
5
  SHA512:
6
- metadata.gz: 0ec050faad375da7b4b13b5686de44b9c9c7f24cef7bedc1f647392620a3dff379f2f409b475d072947215e50ff6ae6d3a976320467a0d41eb579883dc0ae79f
7
- data.tar.gz: c71a5e917920770e4339bab5e208c51b53c9cfcd9a4afe7255996149da0b70db539d6ca12ba983c1147b9611ed8cb342831ce217c7a4adfde93ac3232a2225fb
6
+ metadata.gz: ad9f64e7f2af1d65177e683aa808df6187d9ace11a0f976a925a11d31e74db15c324b10035d4610ff387b5f2b3a1939c4f8c2cf5f7f25e4a237c16350b4ec620
7
+ data.tar.gz: eeff3b1a4c7ea0b48e207c270e1679ba770c2bca21146f879bfb893a1fca314419c5a7a6c35a1437ca4967dbd87a0d703c81b66a16d1326e187da90e2fcf1ac1
data/README.md CHANGED
@@ -128,6 +128,10 @@ You can skip the initial container listing (and container creation) operations a
128
128
 
129
129
  If you set this option, operations can be retried in the buffer. Default value is false. (Used for create/update/flush Blob operations)
130
130
 
131
+ ### startup_fail_on_error
132
+
133
+ If that setting is disabled, the worker won't fail on initialization (getting first access token) error. The default value is true.
134
+
131
135
  ### url_domain_suffix
132
136
 
133
137
  The defaultt `url_domain_suffix` is `.dfs.core.windows.net`, you can override this in case of private endpoints.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -4,7 +4,7 @@ $:.push File.expand_path('../lib', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-azurestorage-gen2"
6
6
  gem.description = "Azure Storage output plugin for Fluentd event collector"
7
- gem.license = "Apache-2.0"
7
+ gem.license = "MIT License"
8
8
  gem.homepage = "https://github.com/oleewere/fluent-plugin-azurestorage-gen2"
9
9
  gem.summary = gem.description
10
10
  gem.version = File.read("VERSION").strip
@@ -35,6 +35,7 @@ module Fluent::Plugin
35
35
  config_param :auto_create_container, :bool, :default => false
36
36
  config_param :skip_container_check, :bool, :default => false
37
37
  config_param :enable_retry, :bool, :default => false
38
+ config_param :startup_fail_on_error, :bool, :default => true
38
39
  config_param :url_domain_suffix, :string, :default => '.dfs.core.windows.net'
39
40
  config_param :format, :string, :default => "out_file"
40
41
  config_param :time_slice_format, :string, :default => '%Y%m%d'
@@ -186,7 +187,19 @@ module Fluent::Plugin
186
187
  def setup_access_token
187
188
  if @azure_storage_access_key.nil?
188
189
  @get_token_lock = Concurrent::ReadWriteLock.new
189
- acquire_access_token
190
+ if @startup_fail_on_error
191
+ acquire_access_token
192
+ else
193
+ while true
194
+ begin
195
+ acquire_access_token
196
+ break
197
+ rescue Exception => e
198
+ log.warn("#{e.message}, acquired token failed, wait 20 seconds until next retry.")
199
+ sleep 20
200
+ end
201
+ end
202
+ end
190
203
  if @azure_oauth_refresh_interval > 0
191
204
  log.info("azurestorage_gen2: Start getting access token every #{@azure_oauth_refresh_interval} seconds.")
192
205
  @get_token_task = Concurrent::TimerTask.new(
@@ -220,7 +233,7 @@ module Fluent::Plugin
220
233
  # https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-linux-vm-access-storage#get-an-access-token-and-use-it-to-call-azure-storage
221
234
  private
222
235
  def acquire_access_token_msi
223
- params = { :"api-version" => ACCESS_TOKEN_API_VERSION, :resource => "https://storage.azure.com/" }
236
+ params = { :"api-version" => ACCESS_TOKEN_API_VERSION, :resource => "https://storage.azures.com/" }
224
237
  unless @azure_instance_msi.nil?
225
238
  params[:msi_res_id] = @azure_instance_msi
226
239
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-azurestorage-gen2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Szabo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -188,7 +188,7 @@ files:
188
188
  - test/plugin/test_out_azurestorage_gen2.rb
189
189
  homepage: https://github.com/oleewere/fluent-plugin-azurestorage-gen2
190
190
  licenses:
191
- - Apache-2.0
191
+ - MIT License
192
192
  metadata: {}
193
193
  post_install_message:
194
194
  rdoc_options: []