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
Control server thread #3349
Closed
Closed
Control server thread #3349
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
Build FAILURE |
@kira-syslogng : retest this please |
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
from
July 6, 2020 10:55
9a1ed48
to
34ecda8
Compare
Build FAILURE |
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
from
July 6, 2020 20:20
27b1e99
to
30ba559
Compare
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
2 times, most recently
from
July 6, 2020 22:45
62eae72
to
fa7139e
Compare
Build FAILURE |
2 similar comments
Build FAILURE |
Build FAILURE |
furiel
reviewed
Jul 10, 2020
lbudai
force-pushed
the
control-server-thread
branch
2 times, most recently
from
July 10, 2020 14:04
bcd88ad
to
7d8dd9a
Compare
Build FAILURE |
@kira-syslogng : retest this please |
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
from
July 10, 2020 16:49
abdaf10
to
b90b09f
Compare
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
2 times, most recently
from
July 10, 2020 18:53
de2f031
to
3e1db0d
Compare
Build FAILURE |
lbudai
force-pushed
the
control-server-thread
branch
2 times, most recently
from
July 10, 2020 20:29
ebc05b8
to
67c1437
Compare
…ot running ControlServer runs iv_main(). In unit tests, iv_main() is not running (dummy control server) and thus iv_event_post has no effect - testcases won't receive response. Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
After reload has done, send back the same response to the connected clients. Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
ControlServer runs it's own iv_main() and when `control_connection_send_reply` is called from a different thread, it executed update watches in the wrong thread (in the main thread which caused a crash in iv_main). Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
… thread After ControlServer is running in a separate thread, secret storage calls the async init cb from a different thread. For example when password protected SSL cert is used and the password is set by the user via 'syslog-ng-ctl credentials', we have to ensure that the `afsocket_dd_try_connect` is executed in the main thread (there is a main-loop-assert and there are ivykis objects registered during `dd_try_connect`). Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
…source Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
TR_MAP_ASYNC_NOT_SUPPORTED means that callback is not registered and not executed. If the caller wants, can execute the callback manually, or, can do something else. TR_MAP_ASYNC_REGISTERED_SUCCESS: callback registered successfully and will be executed later TR_MAP_ASYNC_REGISTERED_FAILES: failed to register callback Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
`current_configuration` could become a dangling pointer when it is assigned to `old_config` and later `old_config` is deinited - for this reason we need to set it NULL after it is assigned to `old_config`. `current_configuration` can be accessed concurrently, so we need to protect it with a lock. Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
As `reopen()` calls `main_loop_call` and playing with ivykis objects, it should be run by the main thread. Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
`control_connection_reopen()` and `control_connection_reload()` are the same... Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
one issue: as GThreads are not cancellable threads, join will be a blocking call. Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
lbudai
force-pushed
the
control-server-thread
branch
from
July 30, 2020 11:37
94915e1
to
352cc1c
Compare
Build SUCCESS |
…requested Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
Signed-off-by: Laszlo Budai <laszlo.budai@outlook.com>
lbudai
force-pushed
the
control-server-thread
branch
from
July 30, 2020 15:48
352cc1c
to
ed8d5e7
Compare
Build SUCCESS |
Kokan
approved these changes
Aug 3, 2020
This was referenced Aug 11, 2020
@lbudai Thank You again for all the efforts to make it more "consumable" for us. |
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.
The aim of this PR is to help users when syslog-ng stuck on 'syslog-ng-ctl stats' (or on any other control command...).
There are two parts of the PR:
iv_main()
)After this PR is merged, it is possible to stop syslog-ng with 'syslog-ng-ctl stop'
even if 'syslog-ng-ctl stats' is still in progress and 'syslog-ng-ctl stats' won't
'suspend' main thread anymore.