Repository navigation
rgw: emit structured JSON for sync status --format - #70160
RaminNietzsche wants to merge 1 commit into
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
16 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Local testing summary (vstart + multisite + induced lag on
Plaintext default unchanged; JSON path omits per-shard marker dumps. Please |
|
Hi @ceph/rgw — gentle ping for review when you have a moment. This adds structured JSON for Could someone please take a look, and also comment |
|
Hi @yehudasa @awojno-bloomberg — pinging you for review based on git blame: you two show up the most around the existing |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
e3c13ef to
fb4df43
Compare
|
Rebased onto current Conflict resolution in Local build: |
7348830 to
7ae5105
Compare
7ae5105 to
ec7802e
Compare
|
jenkins test make check |
cert-review (SEI CERT,
|
chardan
left a comment
There was a problem hiding this comment.
This generally is looking like more improvement for our old friend radosgw-admin! I did have a couple of things I'd like you to peek at/consider again, but in general this is a big improvement.
| ) | ||
| cls.ceph_conf = find_ceph_conf() | ||
| try: | ||
| probe = cls._run_static(['sync', 'status'], check=False) |
There was a problem hiding this comment.
check=False seems a bit odd to me: so if the command fails, what is the ultimate fate of these exceptions? We'll see a message and a SKIPPED test, not a failed one? That doesn't seem right to me, but I'm not entirely up on how the workunits tests are meant to work. Please check that it's the correct behavior.
| if (ret < 0) { | ||
| out->error = string("failed to retrieve sync info: sync.init() failed: ") + | ||
| cpp_strerror(-ret); | ||
| return; |
There was a problem hiding this comment.
Just a general question here. As we're generally restructuring things, is the function both not returning anything AND not raising an exception when an error has occurred the right behavior here? (And, in general.) We're breaking things up into more discrete units, which is terrific-- but it might be a good time to start thinking about this. If this is the pattern that already exists, then we should definitely address it in a future change (exception handling would make this program yet smaller and for the most part from what I see less complicated). If this is something we've added, we might want to make sure to handle things in some way that communicates failure to the caller.
sync status ignored Formatter and always printed plaintext, so --format=json had no effect. Collect metadata and data sync state once into report structs, then render human text or JSON from the same snapshot (shard counts, behind lists, oldest incremental change, recovering shards) without serializing per-shard markers. Preserve the guard that rejects --bucket on sync status and points users at bucket sync status. Add workunit and multisite test coverage plus docs. Address review: include common/Formatter.h, self-contained headers, legacy plaintext shard list brackets, switch default-first with indented cases, -enoent handling, workunit probe SkipTest comment, and document out->error matching legacy sync status exit behavior. Signed-off-by: ramin.najarbashi <[email protected]>
ec7802e to
65b0ba7
Compare
|
Rebased on current ceph/main → tip |
|
jenkins test make check |
|
@chardan Re: review #70160 (review) Workunit
|
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins test ceph-volume alljenkins test windowsjenkins test rook e2eYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.
Summary
radosgw-admin sync statuspreviously ignored--formatand always printed plaintext.--format=json(or another formatter), emit a structured summary aligned with the human-readable output: typedfull_sync/incremental_synccounts,caught_up,shards_behind,behind_shards[],oldest_incremental_change, and data-syncrecovering_*.--format) remains plaintext for compatibility.Testing
Local (vstart single-site +
test-rgw-multisite.sh2 zones + induced lag):OK (skipped=1)— master shape; secondary test skippedOK (skipped=1)OK (skipped=1); JSON has typedfull_sync/incremental_sync/behind_shardslag scenario OK— metadata behind 5 shards, data behind 11 shards,oldest_incremental_changepresentAlso: smoke asserts no
messages/ no rawsync_statusmarkers; plaintext/JSON count parity; light perf comparable (~0.13s both paths).QA added:
qa/workunits/rgw/test_rgw_sync_status_json.py(+ runner + verify suite yaml)@attr('sync_status')insrc/test/rgw/rgw_multi/tests.pyCI: please comment
ok to testif needed for external contributors, thenjenkins test make check.