daichirata / fluent-plugin-gcs

Google Cloud Storage output plugin for Fluentd.
Other
42 stars 19 forks source link

send empty encryption_opts when no encryption_key provided #1

Closed qrtt1 closed 7 years ago

qrtt1 commented 7 years ago

We used gcs plugin without encryption options, but got the errors when using the gcs plugin

2017-01-09 08:43:28 +0000 [warn]: temporarily failed to flush the buffer. next_retry=2017-01-09 08:43:29 +0000 error_class="ArgumentError" error="unknown keyword: encryption_key_sha256" plugin_id="object:3ff2b29b2d84"
  2017-01-09 08:43:28 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-gcs-0.1.1/lib/fluent/plugin/out_gcs.rb:151:in `generate_path'
  2017-01-09 08:43:28 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-gcs-0.1.1/lib/fluent/plugin/out_gcs.rb:103:in `write'
  2017-01-09 08:43:28 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.31/lib/fluent/buffer.rb:354:in `write_chunk'
  2017-01-09 08:43:28 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.31/lib/fluent/buffer.rb:333:in `pop'
  2017-01-09 08:43:28 +0000 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.12.31/lib/fluent/output.rb:342:in `try_flush'

The pull request will pass {} to google-client-api when no encryption information provided

daichirata commented 7 years ago

@qrtt1 Sorry for the late reply.

Thanks for sending an error report and PR! This error was caused by a change in API of google-cloud-storage plugin. link

Since it was necessary to delete the parameters from the plugin, I modified and created v0.2.0 newly. https://github.com/daichirata/fluent-plugin-gcs/pull/2

If you did not report, this fix would have been late. I really appreciate it.