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

reef: common,ceph: add output file switch to dump json to #57676

Open
wants to merge 8 commits into
base: reef
Choose a base branch
from

Commits on Jun 28, 2024

  1. common: use more efficient vector for stack

    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit 770ab51)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    e8dfc5e View commit details
    Browse the repository at this point in the history
  2. common: add JSONFormatterFile class

    To stream JSON to a file for collection (for testing).  The idea here that
    trying to send a very large JSON result over `ceph tell` is best to be avoided.
    
    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit 8928a12)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    5357001 View commit details
    Browse the repository at this point in the history
  3. common/Formatter: write the pending string on flush

    The formatter would be deleted and automatically flush anyway but this is
    conforming to the API.
    
    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit 5a3584b)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    cd917c8 View commit details
    Browse the repository at this point in the history
  4. common/options: add configs for temporary files made by daemons

    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit de350cc)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    7b76947 View commit details
    Browse the repository at this point in the history
  5. common,ceph: add output file switch to dump json to

    The `ceph tell mds.X cache dump` and `ceph tell mds.X ops` commands have a
    useful `--path` argument that directs the daemon to save the dump of the output
    to a file local the daemon. This has several advantages:
    
    * We don't need to construct the JSON output in memory, which may be many gigabytes.
    * Streaming writes to a local file is significantly faster than sending the data over the ceph messenger.
    * The command spends as little time as possible holding relevant locks.
    
    However, only some commands support this and we could make it generic to the
    admin socket interface. So, add a generic --daemon-output-file argument to
    achieve this.
    
    The main concern with this is security (telling the daemon to write to
    arbitrary files) but this is gated by the session caps which require
    "allow_all" and that's typically only valid for the client.admin.
    
    Fixes: https://tracker.ceph.com/issues/65747
    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit a341468)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    ec87611 View commit details
    Browse the repository at this point in the history
  6. qa/workunits: add --output-file test in cephtool workunit

    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit 2d26694)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    257ef42 View commit details
    Browse the repository at this point in the history
  7. test/cli: ignore tmp_file_template

    Its path/name include random characters making it unsuitable for static diffs.
    
    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit cd780f0)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    3833d8a View commit details
    Browse the repository at this point in the history
  8. doc: document new --output-file switch

    Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
    (cherry picked from commit 8664fe9)
    batrick committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    c5fca7d View commit details
    Browse the repository at this point in the history