Repository navigation
Conversation
ca_file, user, password, client_cert, client_key and client_key_pass had no fallback, so an unset env var gave the plugin "" instead of nil. With scheme https, excon then tries to read the client certificate from "" and every request fails with Errno::ENOENT. Use use_default, like the other settings, so the plugin defaults apply. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
Contributor
Author
|
Hi, friendly ping on this one. Happy to adjust anything if needed. The same goes for #1703, also from me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The opensearch
<match>block passesca_file,user,password,client_cert,client_keyandclient_key_passwithout a fallback, so when the env var is not set the plugin gets""instead of nil. WithFLUENT_OPENSEARCH_SCHEME=httpsand no client certificate (the usual case, for example AWS OpenSearch), excon tries to read the client certificate from""and every request fails:This was reported in #1419 and fluent/fluent-plugin-opensearch#99, where the workaround was to override fluent.conf and remove these lines.
This uses
use_default, the same as #1698 did for kafka/kinesis, so an unset env var keeps the plugin default. A set env var works as before. Template and the v1.20 debian-opensearch fluent.conf (amd64 and arm64) are regenerated witherb; only these 6 lines change.Test
Configured
out_opensearch(fluent-plugin-opensearch 1.1.8, excon 1.10.0, Fluentd 1.20.1, same as the image Gemfile.lock) with the<match>block of the generateddebian-opensearchfluent.conf, pointed at a local TLS server answeringGET /like OpenSearch, and calledclient.info:SCHEME=https,SSL_VERIFY=falseErrno::ENOENTUSER/PASSWORDErrno::ENOENTSCHEME=https,CA_PATHset, verify onErrno::ENOENTSCHEME=https, verify on, no CA, self-signed serverErrno::ENOENTCLIENT_CERT/CLIENT_KEYset