Skip to content

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

Open
batrick wants to merge 8 commits intoceph:reeffrom
batrick:wip-66187-reef
Open

reef: common,ceph: add output file switch to dump json to#57676
batrick wants to merge 8 commits intoceph:reeffrom
batrick:wip-66187-reef

Conversation

@batrick
Copy link
Member

@batrick batrick commented May 23, 2024

Note: Includes some commits from the quiesce work to make this backportable.

backport tracker: https://tracker.ceph.com/issues/66187


backport of #57215
parent tracker: https://tracker.ceph.com/issues/65747

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

@batrick batrick added this to the reef milestone May 23, 2024
@batrick batrick added the common label May 23, 2024
@batrick batrick requested review from a team as code owners May 23, 2024 17:58
@ceph ceph deleted a comment from github-actions bot Jun 28, 2024
@github-actions github-actions bot added the stale label Nov 26, 2024
@batrick batrick removed the stale label Nov 26, 2024
@ceph ceph deleted a comment from github-actions bot Dec 30, 2024
@ceph ceph deleted a comment from github-actions bot Dec 30, 2024
@mchangir
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/69881.

@batrick
Copy link
Member Author

batrick commented Feb 10, 2025

(trivial rebase for jenkins)

@mchangir
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/70178.

batrick added 6 commits May 2, 2025 14:24
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 770ab51)
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)
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)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit de350cc)
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)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 2d26694)
batrick added 2 commits May 2, 2025 14:24
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)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8664fe9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants