-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
bin: reload: config: Implement hot reloading feature #6871
Merged
Merged
Conversation
This file contains 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
cosmo0920
force-pushed
the
hot-reloading
branch
from
February 15, 2023 11:21
941e3c0
to
110ae06
Compare
cosmo0920
force-pushed
the
hot-reloading
branch
from
February 16, 2023 09:42
0bef413
to
b3fd92e
Compare
cosmo0920
force-pushed
the
hot-reloading
branch
from
February 16, 2023 09:50
b3fd92e
to
84462cd
Compare
cosmo0920
force-pushed
the
hot-reloading
branch
from
February 22, 2023 09:29
84462cd
to
53e5e07
Compare
FLB_TLS_XXX improves portabilities and brings C11 TLS feature usages. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Using flb_stop and flb_destroy is enough to stop flb context. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
To enable this, provide -Y or --enable-hot-reload option at start up. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
This is because loading YAML specific context does not used for fluent-bit executables. This test case should not unnecessary. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Instead, we should check reloading with processor configuration. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
…roperty checking Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
checking Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
checking Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
cosmo0920
force-pushed
the
hot-reloading
branch
from
April 10, 2023 02:38
b37072d
to
3a1b6db
Compare
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.
Currently, fluent-bit does not support hot reloading feature.
For now, I implemented SIGHUP handler to handle hot reloading.
Some of plugins do not handle pause/resume operations correctly. So, I fixed their behavior by implementing pause/resume callbacks.
Note that fluent-bit uses mk_core as event handling library. This library is not compatible for reloading events.
I tried to add/kick and handle internal reloading events but I didn't get succeeded to reload inside flb_lib contexts.
This causes invalid fd errors or stopping main loop on mk_core.
EDIT: I made this feature as opt-in feature. To enable this, using
-Y
or--enable-hot-reload
option.
Related to #365.
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:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
hot-reload: Add docs for hot-reload fluent-bit-docs#1061
Backporting
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.