Project

General

Profile

Actions

Bug #76253

closed
AK AK

rgw: multisite sync data_log error handling broken in tentacle

Bug #76253: rgw: multisite sync data_log error handling broken in tentacle

Added by Alex Kershaw 7 months ago. Updated 30 days ago.

Status:
Backporting
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Community (user)
Backport:
tentacle
Regression:
Yes
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
multisite, datalog
Fixed In:
v21.0.0-1486-g8a2cf52fbf
Released In:
v21.2.0~456
Upkeep Timestamp:
2026-11-04T01:11:23+00:00

Description

I also noticed the "radosgw-admin sync status" command failing because of this, and that surfaced a separate issue: https://tracker.ceph.com/issues/76228.

The RGW logs show lots of stuff like this:

debug 2026-04-22T10:21:42.204+0000 7f1451db3640 -1 req 18264072610622877276 0.196009278s :list_data_changes_log virtual boost::asio::awaitable<std::tuple<std::span<rgw_data_change_log_entry, 18446744073709551615>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > RGWDataChangesOmap::list(const DoutPrefixProvider*, int, std::span<rgw_data_change_log_entry>, std::string): failed to list data_log.84: End of buffer [buffer:2]
debug 2026-04-22T10:21:42.204+0000 7f13fed0d640 -1 req 11193643246170341286 0.197009310s :list_data_changes_log virtual boost::asio::awaitable<std::tuple<std::span<rgw_data_change_log_entry, 18446744073709551615>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > RGWDataChangesOmap::list(const DoutPrefixProvider*, int, std::span<rgw_data_change_log_entry>, std::string): failed to list data_log.86: End of buffer [buffer:2]

...and counting my data logs in rados:

[qs-admin@albans-sc0 ~]$ rados -p siteA.rgw.log ls | grep -E "^data_log\.[0-9]+"   | wc -l
109

but I expect to see 128. On a freshly deployed cluster using the same settings I do see 128.

[qs-admin@raynor-sc-1 ~]$ rados -p siteB.rgw.log ls | grep -E "^data_log\.[0-9]+" | wc -l
128

So my theory is:
- Tentacle is no longer accepting of missing data_log objects in rados.
- Newly deployed RGWs will have their data_log objects initialized, but old and upgrade clusters may not.

I then found this code (and recent refactor) when grepping for the log I saw above: https://github.com/ceph/ceph/commit/08c0ffdc8921d99069edce49dafb597be4d92d8b

} catch (const sys::system_error& e) {
      if (e.code() == sys::errc::no_such_file_or_directory) {
    co_return std::make_tuple(entries.first(0), std::string{});
      } else {
    ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
               << ": failed to list " << oids[shard]
               << ": " << e.what() << dendl;
    throw;
      }
    }

Clearly it seems we are trying to handle the case of the missing file and failing. I dug a bit more and I think this code should actually be...

} catch (const sys::system_error& e) {
      if (e.code() == sys::errc::no_such_file_or_directory || 
          e.code() == ceph::buffer::errc::end_of_buffer)       <-- new condition
      {
        co_return std::make_tuple(entries.first(0), std::string{});
      } 
      else 
      {
        ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
              << ": failed to list " << oids[shard]
              << ": " << e.what() << dendl;
          throw;
      }
    }

Rebuilding and patching on my cluster makes the error logs disappear, and "radosgw-admin sync status" now returns real data. I won't pretend to understand the nuances of the error typing here (surprised we can get this type in this catch block) but the results are clear. Googling a bit suggested that the error type is registered elsewhere and that this is expected. Suspect this will make sense to someone more familiar with the code.

I'll submit a PR with the fix.


Related issues 1 (1 open — 0 closed)

Copied to rgw - Backport #76650: tentacle: rgw: multisite sync data_log error handling broken in tentacleNew

Actions

AK Updated by Alex Kershaw 7 months ago Actions #1

I should have included above, the errors only related to the 19 data_logs that are missing.

[qs-admin@condor-sc0 ~]$ sudo docker logs  ceph-8f9a7ae9-968d-42ae-86e9-7f49d1e61624-rgw-fc32e777-condor-sc0-yquyag  --tail 10000  | grep "failed to list" | grep -oE "data_log\.[0-9]+" | sort -n | uniq
data_log.109
data_log.110
data_log.111
data_log.112
data_log.113
data_log.114
data_log.50
data_log.6
data_log.7
data_log.8
data_log.84
data_log.85
data_log.86
data_log.87
data_log.88
data_log.89
data_log.90
data_log.91
data_log.92

AK Updated by Alex Kershaw 7 months ago Actions #2

  • Pull request ID set to 68601

CB Updated by Casey Bodley 7 months ago Actions #3

  • Status changed from New to Fix Under Review
  • Backport set to tentacle
  • Tags (freeform) set to multisite datalog

JI Updated by J. Eric Ivancich 7 months ago Actions #4

  • Assignee set to Alex Kershaw

UB Updated by Upkeep Bot 7 months ago Actions #5

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to 8a2cf52fbf5ecfb188b8c2802553bf47fe9baaa0
  • Fixed In set to v21.0.0-1486-g8a2cf52fbf
  • Upkeep Timestamp set to 2026-05-18T04:49:28+00:00

UB Updated by Upkeep Bot 7 months ago Actions #6

  • Copied to Backport #76650: tentacle: rgw: multisite sync data_log error handling broken in tentacle added

UB Updated by Upkeep Bot 7 months ago Actions #7

  • Tags (freeform) changed from multisite datalog to multisite datalog backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #8

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-05-18T04:49:28+00:00 to 2026-08-27T18:32:30+00:00

UB Updated by Upkeep Bot 3 months ago Actions #9

  • Tags (freeform) changed from multisite datalog backport_processed to multisite, datalog
  • Upkeep Timestamp changed from 2026-08-27T18:32:30+00:00 to 2026-08-28T01:51:34+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #10

  • Released In set to v21.2.0~455
  • Upkeep Timestamp changed from 2026-08-28T01:51:34+00:00 to 2026-10-24T01:23:35+00:00

UB Updated by Upkeep Bot 30 days ago Actions #11

  • Released In changed from v21.2.0~455 to v21.2.0~456
  • Upkeep Timestamp changed from 2026-10-24T01:23:35+00:00 to 2026-11-04T01:11:23+00:00
Actions

Also available in: PDF Atom