rgw/cloud-restore: admin CLI for restore list and status#62830
rgw/cloud-restore: admin CLI for restore list and status#62830soumyakoduri merged 2 commits intoceph:mainfrom
Conversation
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
@soumyakoduri Could you take a look at this? |
2afd3c6 to
1a5541a
Compare
soumyakoduri
left a comment
There was a problem hiding this comment.
Could you please paste sample output of these cmds.
Also IMO it would benefit if we could list objects' names as part of restore_list output along with their restore status. These count (for each status value) can be added to bucket stats instead.
1a5541a to
8d46060
Compare
8d46060 to
1e217a8
Compare
|
jenkins test api |
|
jenkins test make check |
1e217a8 to
df9ae00
Compare
anthonyeleven
left a comment
There was a problem hiding this comment.
Suggest uppercasing CLI in the PR title.
df9ae00 to
917c310
Compare
|
jenkins test make check |
soumyakoduri
left a comment
There was a problem hiding this comment.
few comments wrt to error handling. Rest looks good to me.
| ret = obj->get_obj_attrs(null_yield, dpp()); | ||
| if (ret < 0) { | ||
| cerr << "ERROR: failed to stat object, returned error: " << cpp_strerror(-ret) << std::endl; | ||
| return 1; |
There was a problem hiding this comment.
What does the caller expects in case of error - negative or positive return codes ? Like was the case in bucket_restore_stats, I see mix of positive and negative values being returned in this routine too for error cases. Is that expected?
There was a problem hiding this comment.
main() in radosgw-admin.cc expecting postive returns values, so bucket_restore_stats needs to return negative values I will change accordingly. Thanks for pointing it out
|
jenkins test api |
|
jenkins test make check |
Also added stats as part of radosgw-admin bucket stats command Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
f117ff4 to
02c925c
Compare
26bea72 to
d5f1eba
Compare
d5f1eba to
0df2977
Compare
|
jenkins test make check |
|
@thotz .. looks like make check is failing in radosgw-admin help. Could you please check |
0df2977 to
baca588
Compare
…cket stats Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
baca588 to
1085dfc
Compare
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
4 similar comments
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
Pr testing completed , Approved by @ivancich details are in :https://tracker.ceph.com/issues/73724, |
Adding radosgw-admin cli to list and check status of objects in the bucket
Sample O/P
sample output: aws s3 ls --endpoint-url http://localhost:8002 s3://bkt 2025-08-20 23:12:57 0 blah 2025-08-20 17:52:41 0 file 2025-08-20 23:02:00 0 new build$ aws s3api restore-object --endpoint-url http://localhost:8002 --bucket bkt --key new --restore-request Days=20 build$ aws s3api restore-object --endpoint-url http://localhost:8002 --bucket bkt --key file --restore-request Days=20 $ aws s3 ls --endpoint-url http://localhost:8002 s3://bkt 2025-08-20 23:12:57 0 blah 2025-08-20 17:52:41 6 file 2025-08-20 23:02:00 6 new build$ ../src/mrun c2 radosgw-admin restore status --bucket bkt --object new { "name": "new", "RestoreExpiryDate": "2025-08-21T14:28:13.033681Z", "RestoreStatus": "CloudRestored", "RestoreType": "Temporary", "RestoreTime": "2025-08-21T14:18:13.033678Z" } build$ ../src/mrun c2 radosgw-admin bucket stats --bucket bkt --show--restore-stats { "bucket": "bkt", "tenant": "", "versioning": "off", "zonegroup": "bc56dd78-01cf-4122-9b0c-fdf492d7410f", "placement_rule": "default-placement", "explicit_placement": { "data_pool": "", "data_extra_pool": "", "index_pool": "" }, "id": "8526fe7b-3682-41a5-b972-0245727f5409.14177.9", "marker": "8526fe7b-3682-41a5-b972-0245727f5409.14177.9", "index_type": "Normal", "index_generation": 0, "num_shards": 11, "reshard_status": "None", "judge_reshard_lock_time": "0.000000", "object_lock_enabled": false, "mfa_enabled": false, "owner": "testid", "ver": "0#1,1#1,2#1,3#1,4#36,5#1,6#1,7#1,8#50,9#1,10#1", "master_ver": "0#0,1#0,2#0,3#0,4#0,5#0,6#0,7#0,8#0,9#0,10#0", "mtime": "2025-08-20T12:21:54.997530Z", "creation_time": "2025-08-20T11:19:49.007743Z", "max_marker": "0#,1#,2#,3#,4#,5#,6#,7#,8#,9#,10#", "usage": { "rgw.main": { "size": 0, "size_actual": 0, "size_utilized": 0, "size_kb": 0, "size_kb_actual": 0, "size_kb_utilized": 0, "num_objects": 0 }, "rgw.cloudtiered": { "size": 12, "size_actual": 8192, "size_utilized": 12, "size_kb": 1, "size_kb_actual": 8, "size_kb_utilized": 1, "num_objects": 3 } }, "bucket_quota": { "enabled": false, "check_on_raw": false, "max_size": -1, "max_size_kb": 0, "max_objects": -1 }, "read_tracker": 2 } { "restore_stats": { "restore_completed_count": 2, "restore_in_progress_count": 0, "restore_failed_count": 0 } } build$ ../src/mrun c2 radosgw-admin restore list --bucket bkt { "file": "CloudRestored", "new": "CloudRestored" } build$ ../src/mrun c2 radosgw-admin restore list --bucket bkt --restore-status=CloudRestored { "file": "CloudRestored",, "new": "CloudRestored" }Fixes: https://tracker.ceph.com/issues/70931
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 Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition