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

Projects
None yet
2 participants
@bootjp
Copy link
Contributor

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.

bootjp added some commits Nov 14, 2018

Add connection check at startup when out_forward.
Signed-off-by: bootjp <oh@bootjp.me>
Fix test description.
Signed-off-by: bootjp <oh@bootjp.me>
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 test/plugin/test_out_forward.rb Outdated
Show resolved Hide resolved lib/fluent/plugin/out_forward.rb Outdated

@repeatedly repeatedly self-assigned this Nov 21, 2018

bootjp added some commits Nov 22, 2018

Fix error message.
Signed-off-by: bootjp <oh@bootjp.me>
Fix style of test case.
Signed-off-by: bootjp <oh@bootjp.me>

@bootjp bootjp force-pushed the bootjp:master branch from e65438b to 8a7022d Nov 22, 2018

@bootjp

This comment has been minimized.

Copy link
Contributor Author

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

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
DCO DCO
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@repeatedly

This comment has been minimized.

Copy link
Member

commented Nov 22, 2018

Merged. Thanks!

@bootjp

This comment has been minimized.

Copy link
Contributor Author

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
You can’t perform that action at this time.