Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add connection check at startup when out_forward. #2184

Merged
merged 4 commits into from
Nov 22, 2018

Conversation

bootjp
Copy link
Contributor

@bootjp bootjp commented Nov 21, 2018

Added an option to check the out_forward node and communication when starting fluentd.

It is a matter with the following mailing list.
https://groups.google.com/forum/#!topic/fluentd/2ITnHbveYIM

Hello

I am using fluentd v1.2.6 in TLS encryption mode when forwarding in out_forward -> in_forward.

At fluentd startup I'd like to check if the out_forward process can connection with the in_forward node before listening for the forward port.
Does anyone know a good way about this?

The use case is below.
Existing applications are built across AWS and GCP, and the analysis base is in GCP.
I use out_forward TCP encryption for AWS and GCP connections.

The out_forward on the AWS side is redundant with the Active / Standby configuration.
When fluentd is deployed Switch from Active to Standby and return to the original Active / Standby when deployment is completed.

I think that it is desirable that fluentd gets an error as it is when the out_forward -> in_forward connection can not be performed by the new deployment so that the crash occurs.

The assumed error is a certificate validation failure or SHARD key mismatch.

I recognize that these errors are not checked at startup in fluentd now
See you.

I am not familiar with Ruby, and since I read the Fluentd code for the first time this time, please let me know if there is a better implementation.

This pull request is the same as below. #2180
I seemed to be merged because I was force pusn by the bot set in my account and the difference disappeared.
Bot has already been lifted.

Signed-off-by: bootjp <oh@bootjp.me>
Signed-off-by: bootjp <oh@bootjp.me>
test/plugin/test_out_forward.rb Outdated Show resolved Hide resolved
test/plugin/test_out_forward.rb Outdated Show resolved Hide resolved
test/plugin/test_out_forward.rb Outdated Show resolved Hide resolved
lib/fluent/plugin/out_forward.rb Outdated Show resolved Hide resolved
@repeatedly repeatedly self-assigned this Nov 21, 2018
@repeatedly repeatedly added v1 enhancement Feature request or improve operations labels Nov 21, 2018
Signed-off-by: bootjp <oh@bootjp.me>
Signed-off-by: bootjp <oh@bootjp.me>
@bootjp
Copy link
Contributor Author

bootjp commented Nov 22, 2018

Thank you for code review.
Several Ruby knowledge was deepened and it was very meaningful.

@repeatedly repeatedly merged commit c505cf6 into fluent:master Nov 22, 2018
@repeatedly
Copy link
Member

Merged. Thanks!

@bootjp
Copy link
Contributor Author

bootjp commented Nov 27, 2018

@repeatedly
Thanks for merge.
When will this change be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants