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

reattach to the syslog-ng console from syslog-ng-ctl #326

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Commits on Oct 6, 2024

  1. scratch-buffers: do not use ivykis in non-ivykis threads

    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]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    eb9f896 View commit details
    Browse the repository at this point in the history
  2. control: make it possible to query if a worker relates to a connection

    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]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    6c5fefc View commit details
    Browse the repository at this point in the history
  3. control: cancel connection related workers

    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]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    2ff65a5 View commit details
    Browse the repository at this point in the history
  4. control: call app_thread_start/stop from command threads

    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    e5eabb3 View commit details
    Browse the repository at this point in the history
  5. control: add support for passing 3 fds through the control socket

    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 committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    07416ff View commit details
    Browse the repository at this point in the history
  6. console: new module to track the interactive connection to a terminal

    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    5d4d649 View commit details
    Browse the repository at this point in the history
  7. gprocess: integrate startup with the new console management module

    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    043d50c View commit details
    Browse the repository at this point in the history
  8. mainloop-control: add support for ATTACH STDIO

    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]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    d0f679b View commit details
    Browse the repository at this point in the history
  9. syslog-ng-ctl: add support for "attach" command

    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    004bc3b View commit details
    Browse the repository at this point in the history
  10. control: remove and bump verbosity for some control socket related me…

    …ssages
    
    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    c5e220b View commit details
    Browse the repository at this point in the history
  11. gprocess: get rid off the stderr_present variable

    Signed-off-by: Balazs Scheidler <[email protected]>
    bazsi committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    3db4f22 View commit details
    Browse the repository at this point in the history