-
Notifications
You must be signed in to change notification settings - Fork 17
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
reattach to the syslog-ng console from syslog-ng-ctl #326
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
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
October 5, 2024 17:40
789250c
to
224ed6a
Compare
bazsi
changed the title
Syslog ng ctl attach command
reattach to the syslog-ng output/logs from syslog-ng-ctl
Oct 5, 2024
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
3 times, most recently
from
October 6, 2024 08:44
8e81b73
to
cf46e3d
Compare
bazsi
changed the title
reattach to the syslog-ng output/logs from syslog-ng-ctl
reattach to the syslog-ng console from syslog-ng-ctl
Oct 6, 2024
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
October 6, 2024 11:51
cf46e3d
to
3db4f22
Compare
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
October 27, 2024 11:29
3db4f22
to
6dcf9ab
Compare
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
November 7, 2024 09:47
6dcf9ab
to
aa64599
Compare
scratch_buffers_lazy_update_stats() uses the ivykis time state to check if it is time to update the stats about scratch buffers. Do not do that if ivykis is not initialized. This may happen in control threads and the debugger threads that do use scratch buffers but don't use ivykis. Signed-off-by: Balazs Scheidler <[email protected]>
A better solution would be to have a connection specific worker list, and a list of connections. But for now this suffices for my purposes of being able to cancel connection specific workers. Signed-off-by: Balazs Scheidler <[email protected]>
Up to now, control worker threads were only cancelled at exit. Truth be told we never really detected if the peer has disconnected either. This patch implements thread cancellation whenever a connection closes, to detect the closure of the connection comes in a separate patch. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
This will be used to pass over the stdio file descriptors from syslog-ng-ctl so we can attach to the syslog-ng process after it was started in the background. Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
November 7, 2024 10:00
aa64599
to
04b742d
Compare
To avoid being racy. Signed-off-by: Balazs Scheidler <[email protected]>
We don't need this anymore. Signed-off-by: Balazs Scheidler <[email protected]>
This new command allows to reconnect the stdio streams even if syslog-ng runs in the background. syslog-ng-ctl will be able to pass 3 fds to the syslog-ng process, which will be duplicated into the standard fds and with that syslog-ng will happily start displaying its stdout to that terminal. The ATTACH command itself is threaded and the control socket is only used to indicate that the peers are still alive. syslog-ng will start sending "ALIVE" messages to this stream every second or so. If sending this packet is not successful, the connection is closed and the thread is cancelled. Upon cancellation, the stdio fds are restored to point to /dev/null. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
…ssages Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
force-pushed
the
syslog-ng-ctl-attach-command
branch
from
November 7, 2024 14:22
04b742d
to
fa16ac6
Compare
alltilla
approved these changes
Nov 7, 2024
fekete-robert
pushed a commit
to axoflow/axosyslog-core-docs
that referenced
this pull request
Nov 9, 2024
alltilla
added a commit
to alltilla/axosyslog
that referenced
this pull request
Nov 11, 2024
Signed-off-by: Attila Szakacs <[email protected]>
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.
This PR allows syslog-ng-ctl to connect back to syslog-ng's original stdin/out/err fds and re-acqiure the output on those fds.
There are three subcommands:
The other allows you to steal the log messages:
The other allows you to start the debugger on the new console:
There can only be one such attached process at any time.