Skip to content

Commit 313bfca

Browse files
committed
Tools/rados: Improve Error Messaging for Object Name Resolution
The current implementation of 'rados clearomap' exhibits a behavior where an error message is generated without the associated object name or, in the case of a non-existent object name, may result in a segmentation fault. The proposed fix addresses this issue by enhancing the error message. After applying the fix, error messages will consistently display the correct object name, providing users with more accurate and actionable information. Fixes: https://tracker.ceph.com/issues/63541 Signed-off-by: Nitzan Mordechai <[email protected]>
1 parent 33363a5 commit 313bfca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rados/rados.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2971,7 +2971,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
29712971
for (const auto& oid : oids) {
29722972
ret = io_ctx.omap_clear(oid);
29732973
if (ret < 0) {
2974-
cerr << "error clearing omap keys " << pool_name << "/" << prettify(*obj_name) << "/"
2974+
cerr << "error clearing omap keys " << pool_name << "/" << prettify(oid) << "/"
29752975
<< cpp_strerror(ret) << std::endl;
29762976
return 1;
29772977
}

0 commit comments

Comments
 (0)