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

Add sigdump func to fluent-ctl #3680

Merged
merged 15 commits into from May 20, 2022

Commits on Mar 18, 2022

  1. Just refactored codes

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 18, 2022
    Copy the full SHA
    29d5458 View commit details
    Browse the repository at this point in the history
  2. Add dump func to fluent-ctl

    TODO
    
    - add test-codes
    - support winsvc
    - consider about supporting rpc
    - consider about supporting the next error which occurs without `/tmp` dir.
     (`Sigdump.dump` outputs to `/tmp/sigdump-{pid}.log` by default)
    
    error: `failed to dump: No such file or directory @ rb_sysopen - /tmp/sigdump-{pid}.log`
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 18, 2022
    Copy the full SHA
    dcca77a View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2022

  1. Unify by symbol

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 21, 2022
    Copy the full SHA
    861493f View commit details
    Browse the repository at this point in the history
  2. Add rpc api/processes.dump

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 21, 2022
    Copy the full SHA
    337b099 View commit details
    Browse the repository at this point in the history
  3. Support SVC control for Windows Service

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 21, 2022
    Copy the full SHA
    97bc7a0 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. Fix undefined method error

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 22, 2022
    Copy the full SHA
    50dbfa6 View commit details
    Browse the repository at this point in the history
  2. Add test

    A class definition in `test_in_object_space` was making Sigdump fail.
    This is because `ObjectSpace.each_object` iterates all classes defined.
    I have fixed this so that `FailObject.class` raises an error only in
    `test_in_object_space`.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 22, 2022
    Copy the full SHA
    42b581e View commit details
    Browse the repository at this point in the history
  3. Support the case where /tmp dir doesn't exist on Windows

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 22, 2022
    Copy the full SHA
    1a46147 View commit details
    Browse the repository at this point in the history
  4. Fix problem where CONT signal is sent infinitely on UNIX-like

    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 22, 2022
    Copy the full SHA
    b6f9b35 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2022

  1. Change sigdump path on Windows

    To "%windir%/Temp/fluentd-sigdump-#{Process.pid}.log" by default.
    
    When 'SIGDUMP_PATH' environment variable is specified,
    add pid to the extension of the path
    in order to avoid a conflict of writing to the same file.
    
    Made no modifications for UNIX-like for this commit.
    As for UNIX-like, in order to add the same specification, 
    need to add a trap of SIGCONT to the worker processes
    or to fix the Sigdump library.
    However, it loses backward compatibility for users using 'SIGDUMP_PATH'
    environment variable, so need to consider what to do.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 23, 2022
    Copy the full SHA
    65407e5 View commit details
    Browse the repository at this point in the history
  2. Fix handler name

    to describe its function well
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 23, 2022
    Copy the full SHA
    eac5ce1 View commit details
    Browse the repository at this point in the history
  3. Abolish SIGCONT trap on UNIX-like

    Shouldn't change SIGCONT behavior on UNIX-like for backward compatibility.
    The rpc dump command is a new function, so make it send SIGCONT to all fluentd
    processes.
    
    With `SIGDUMP_PATH` environment variable specified on UNIX-like,
    the rpc dump command will cause a writing conflict.
    This should be fixed by improving the Sigdump library so that we can
    specify a directory path.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 23, 2022
    Copy the full SHA
    9d0d1f3 View commit details
    Browse the repository at this point in the history
  4. Wrap Windows dump process with a new thread

    In order not to block the waiting thread.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 23, 2022
    Copy the full SHA
    dafde43 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2022

  1. Fix failing test

    This test works fine on its own, but some other tests make it fail.
    Use mock to solve this problem.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Mar 24, 2022
    1
    Copy the full SHA
    0d126de View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. Remove RPC API /api/processes.dump

    There is no actual request from users, and it might introduce security risk.
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed May 19, 2022
    Copy the full SHA
    4b18c6f View commit details
    Browse the repository at this point in the history