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

bin: reload: config: Implement hot reloading feature #6871

Merged
merged 60 commits into from
Apr 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
beec343
reload: add reload interface
edsiper Feb 1, 2023
0e0b069
lib: add interface to auto set the active context on start
edsiper Feb 1, 2023
09b2bf7
config: in_lib: bin: Refactor context initialization mechanism
cosmo0920 Feb 14, 2023
0869a7d
in_random: Support resume/pause operations
cosmo0920 Feb 14, 2023
20bf05c
input: engine: Add debug prints
cosmo0920 Feb 14, 2023
705ec1b
in_lib: Make buildable on Windows
cosmo0920 Feb 3, 2023
9b80f51
bin: reload: Implement reloading mechanism for loading file case
cosmo0920 Feb 3, 2023
d31de42
in_exec_wasi: Support resume/pause operations
cosmo0920 Feb 3, 2023
ab3df63
wasm: Initialize buffers properly
cosmo0920 Feb 3, 2023
e537517
reload: Plug SEGV case without loading conf file
cosmo0920 Feb 7, 2023
48f45bd
reload: Reconstruct config format context
cosmo0920 Feb 7, 2023
5c03ade
bin: reload: Handle config format context from command line arguments
cosmo0920 Feb 8, 2023
4a89773
bin: Teardown cleanly on dry-run
cosmo0920 Feb 8, 2023
0d8951d
lib: Add interface to set active context of config format
cosmo0920 Feb 8, 2023
746bca0
bin: Use the interface setter/getter for active context of config format
cosmo0920 Feb 8, 2023
4d9eb6d
reload: Halt reloading when handling an invalid context of config format
cosmo0920 Feb 8, 2023
af3236c
input: Extract functions for checking properties of config_map
cosmo0920 Feb 9, 2023
21e57bd
custom: Extract a function for checking properties of config_map
cosmo0920 Feb 9, 2023
7527335
filter: Extract a function for checking properties of config_map
cosmo0920 Feb 9, 2023
df4b4fd
output: Extract functions for checking properties of config_map
cosmo0920 Feb 9, 2023
d3fca07
reload: Validate all type of plugin's config_map
cosmo0920 Feb 9, 2023
948d9d6
reload: Halt to reload when encountoring no matching rule on filters
cosmo0920 Feb 9, 2023
c59714b
filter: Extract as a function for checking existence of match properties
cosmo0920 Feb 10, 2023
7a1e010
reload: Use match property checker for filters
cosmo0920 Feb 10, 2023
33cdc79
reload: Plug invalid memory statuses when reloading is halted
cosmo0920 Feb 10, 2023
201f47f
bin: Migrate to use config_map for some optargs handlings
cosmo0920 Feb 10, 2023
7e195af
parser: Extract as a function for checking file stat
cosmo0920 Feb 14, 2023
9059232
bin: Migrate as config_map based handling for loading parser conf file
cosmo0920 Feb 14, 2023
1b77b95
reload: Inherit verbose level from the old ctx context
cosmo0920 Feb 14, 2023
7ac22d7
reload: Reconstruct stream processor from command line
cosmo0920 Feb 14, 2023
6c07ce9
bin: lib: reload: Remove debug prints
cosmo0920 Feb 10, 2023
0b9947e
engine: Remove a debug print
cosmo0920 Feb 10, 2023
eaa06b0
input: Remove a debug print
cosmo0920 Feb 10, 2023
3e4f07e
config: Add parameter to store external plugin paths
cosmo0920 Feb 14, 2023
c24df65
reload: Teardown for an allocated value
cosmo0920 Feb 14, 2023
a4fbea6
bin: reload: Handle external plugins
cosmo0920 Feb 14, 2023
26bf7d8
reload: Add missing ifdefs for stream processor
cosmo0920 Feb 15, 2023
d850035
lib: Use flb thread local storage(TLS) mechanism
cosmo0920 Feb 22, 2023
ab4f915
http_server: reload: Implement reload endpoint to send SIGHUP
cosmo0920 Feb 16, 2023
b45b3bc
reload: Use %u instead of %i formatter for thread id
cosmo0920 Feb 16, 2023
db1d3b1
http: reload: Accept only for POST and PUT methods
cosmo0920 Feb 22, 2023
45c7184
bin: config: Add reference for cf_opts
cosmo0920 Feb 24, 2023
37fb3f7
reload: Add NULL check for ctx argument
cosmo0920 Feb 24, 2023
7c67440
bin: Remove unused variables
cosmo0920 Feb 27, 2023
8f81f58
lib: Use flb_stop instead of flb_config_exit due to SEGV occurring
cosmo0920 Feb 28, 2023
d11c963
reload: Halt reloading when flb context creation is failed
cosmo0920 Feb 28, 2023
06b399d
test: internal: reload: Add test cases for reload functions
cosmo0920 Feb 28, 2023
a9b095c
reload: Add metas handling operation
cosmo0920 Feb 28, 2023
54a74f1
config_format: Add env and metas dumps
cosmo0920 Feb 28, 2023
814828d
reload: test: internal: Add yaml format test case for cf reloading
cosmo0920 Feb 28, 2023
d864c97
reload: test: Add actual test case for reloading
cosmo0920 Feb 28, 2023
aaa3e6d
bin: config: reload: Make opt-in feature for hot reloading
cosmo0920 Mar 15, 2023
0841793
http_server: v2: reload: Handle opt-in feature correctly
cosmo0920 Mar 15, 2023
50d4b3c
reload: tests: internal: Enable hot reloading manually
cosmo0920 Mar 15, 2023
18fa4a1
bin: Fix a typo on a description of command line for hot reloading
cosmo0920 Mar 22, 2023
2fa4ea8
reload: test: Remove a needless testcase
cosmo0920 Apr 8, 2023
df645a1
reload: test: Add reloading with YAML processor case
cosmo0920 Apr 8, 2023
e4962a9
input: Destroy input plugin instances on teardown instead of during p…
cosmo0920 Apr 10, 2023
2c90848
output: Destroy plugin instances on teardown instead of during property
cosmo0920 Apr 10, 2023
3a1b6db
custom: Destroy plugin instances on teardown instead of during property
cosmo0920 Apr 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bin: Remove unused variables
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
  • Loading branch information
cosmo0920 committed Apr 10, 2023
commit 7c67440b3adde56666ee23b94ce9b8dc901e44c2
10 changes: 0 additions & 10 deletions src/fluent-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,6 @@ static struct flb_cf *service_configure(struct flb_cf *cf,
struct flb_config *config, char *file)
{
int ret = -1;
struct flb_cf_section *s;
struct flb_kv *kv;
struct mk_list *head;
struct cfl_kvpair *ckv;
struct cfl_list *chead;

#ifdef FLB_HAVE_STATIC_CONF
cf = flb_config_static_open(file);
Expand Down Expand Up @@ -726,8 +721,6 @@ int flb_main(int argc, char **argv)
/* local variables to handle config options */
char *cfg_file = NULL;

void *ctx_original;

/* config format context */
struct flb_cf *cf;
struct flb_cf *tmp;
Expand Down Expand Up @@ -1077,9 +1070,6 @@ int flb_main(int argc, char **argv)
exit(EXIT_SUCCESS);
}

/* backup the address */
ctx_original = ctx;

/* start Fluent Bit library */
ret = flb_start(ctx);
if (ret != 0) {
Expand Down