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

Fix CMakeLists.txt with -DFLB_TLS=OFF #3043

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

yongtang
Copy link
Contributor

@yongtang yongtang commented Feb 9, 2021

This PR tries to address the issue raised in #2999 where
it was not possible to disable TLS to build fluent-bit.

When cmake is invoked with -DFLB_TLS=OFF -DFLB_OUT_TD=OFF
many plugins (especially cloud vendor provided ones like AWS/Azure/etc)
will fail as they depends on TLS. This PR mostly updates
the CMakeLists.txt to remove the plugins when TLS is disabled.

Without TLS, it is still possible to build 50+ plugins in fluent-bit
so it is worthwhile to provide this options to users.

This PR fixes #2999.

Signed-off-by: Yong Tang [email protected]


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

Documentation

  • [N/A] Documentation required for this feature

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@edsiper
Copy link
Member

edsiper commented Feb 11, 2021

thanks @yongtang !

a few requirements, would you please split the commits per components ?, e.g:

  • build: ...everything on any cmake file...
  • http_client: ...
  • upstream: ...
  • io: ...

@edsiper edsiper added the waiting-for-user Waiting for more information, tests or requested changes label Feb 11, 2021
This commit changes `struct flb_tls *tls` to `void *tls`
at the api in flb_upstream_create_url. Since flb_upstream_create_url
is used both in tls and non-tls mode, it is not possible to
disable this fuction in non-tls build. Instead with the API change
it is possible to build with non-tls through `#if #else #fi` inside
the function.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
This commit updates flb_io.c and use FLB_HAVE_TLS
so that it is possible to build with tls and non-tls.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
This commit updates flb_http_client.h and use FLB_HAVE_TLS
so that it is possible to build with tls and non-tls.

SInce flb_http_client pretty much depends on TLS,
this commit use FLB_HAVE_TLS to exclude build in case
non-tls build is encountered.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
This commit updates flb_lib.c and use FLB_HAVE_TLS
so that it is possible to build with tls and non-tls.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
This commit updates flb_help.c and use FLB_HAVE_TLS
so that it is possible to build with tls and non-tls.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
This commit updates CMakeLists.txt so that it is possible
to build with TLS and non-TLS selectively.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
@yongtang
Copy link
Contributor Author

Thanks @edsiper for the review. The PR has been updated now. Please take a look and let me know if there are any other issues.

@a8j8i8t8
Copy link

I was testing version 1.7.2 with AWS ES but it failed with below error.

fluent-bit-hkgms fluent-bit [2021/03/17 08:09:13] [error] [upstream] connection #258 to search-domain-logssystem-REDACTED.zone.es.amazonaws.com:443 timed out after 10 seconds

Is this PR related to that?
Appreciate your help.

@a8j8i8t8
Copy link

fluent-bit-hkgms fluent-bit [2021/03/17 08:09:13] [error] [upstream] connection #258 to search-doamin-logssystem-REDACTED.zone.es.amazonaws.com:443 timed out after 10 seconds

I am getting above error with version 1.7.2.
Is this PR related to above?
Appreciate your help.

@nokute78
Copy link
Collaborator

@a8j8i8t8 This patch doesn't cause your issue.
Because the patch is not merged yet.

@a8j8i8t8
Copy link

a8j8i8t8 commented Mar 18, 2021

@a8j8i8t8 This patch doesn't cause your issue.
Because the patch is not merged yet.

@nokute78
I meant, will this PR fix my issue? :-)

@nokute78
Copy link
Collaborator

@a8j8i8t8 Oops.

However this patch will not help your issue.
It is to fix compilation error.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Stale waiting-for-user Waiting for more information, tests or requested changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing to compile Fluent Bit with following options
4 participants