Project

General

Profile

Actions

Bug #75466

closed
OO OO

rgw/qa/multisite: "test_period_update_commit" fails due to an earlier testcase (test_topic_notification_sync)

Bug #75466: rgw/qa/multisite: "test_period_update_commit" fails due to an earlier testcase (test_topic_notification_sync)

Added by Oguzhan Ozmen 9 months ago. Updated about 1 month ago.

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

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-6253-gef86dd5fba
Released In:
v21.2.0~988
Upkeep Timestamp:
2026-10-24T02:01:18+00:00

Description

test_period_update_commit seems to be failing occasionally. It seems be passing consistently when running locally.

It fails at the very last step at the check zonegroup_data_checkpoint. This might be a scale issue as this testcase uploads a couple of thousand objects concurrently. Relevant log lines:

...
# this is last (5 of 5) verification after a period update --commit
2026-03-07T06:17:10.733 INFO:rgw_multi.tests:verify data sync is making progress
...
# The workload stopped (all 25 threads)
2026-03-07T06:21:14.514 INFO:rgw_multi.tests:uploaded 4000 times for the range (900, 999) to bucket=jwzcgy-66
2026-03-07T06:21:14.550 INFO:rgw_multi.tests:uploaded 4000 times for the range (700, 799) to bucket=jwzcgy-66
...
2026-03-07T06:21:14.711 INFO:rgw_multi.tests:uploaded 4000 times for the range (1600, 1699) to bucket=jwzcgy-66
...
# but after 5 mins (default timeout) - zonegroup_data_checkpoint timed out
2026-03-07T06:26:13.259 INFO:teuthology.orchestra.run.trial052.stderr:2026-03-07T06:26:13.256+0000 7f6f8bfff640  0 WARNING: curl operation timed out, network average transfer speed less than 1024 Bytes per second during 300 seconds.

It'd be enough to make the s3 client wkld less aggressive to get uploaded objects replicated in reasonable amount of time.


Related issues 1 (0 open — 1 closed)

Copied to rgw - Backport #75638: tentacle: rgw/qa/multisite: "test_period_update_commit" fails due to an earlier testcase (test_topic_notification_sync)RejectedOguzhan Ozmen

Actions

OO Updated by Oguzhan Ozmen 9 months ago Actions #1

  • Subject changed from rgw/qa/multisite: flaky test - "test_period_update_commit" failure (main) to rgw/qa/multisite: "test_period_update_commit" fails due to an earlier testcase (test_topic_notification_sync)

Looks like why test_period_update_commit fails is due to an earlier testcase: test_topic_notification_sync. So, test_period_update_commit is surfacing an issue introduced in another testcase.

Although test_topic_notification_sync passes, it (because of a bug - see below) causes an ~infinite loop of deleting topics which in turn later causes test_period_update_commit to fail because when the realm is being reloaded due to this enourmous volume of topic-delete requests front-end pause never completes.

Looking at one of the teuthology runs in which test_period_update_commit fails:

test_topic_notification_sync, in the end of the testcase, deletes topics which starts correctly deleting topics with 11 shards (0-10) since default config rgw_bucket_persistent_notif_num_shards = 11.

2026-03-13T16:53:53.660+0000 ... INFO: queue: RGW11111111111111111:topic-uivxhh-2 removed from queue list
2026-03-13T16:53:53.660+0000 ... INFO: queue: RGW11111111111111111:topic-uivxhh-2.1 removed from queue list
2026-03-13T16:53:53.664+0000 ... INFO: queue: RGW11111111111111111:topic-uivxhh-2.2 removed from queue list
...
2026-03-13T16:53:53.676+0000 ... INFO: queue: RGW11111111111111111:topic-uivxhh-2.10 removed from queue list

But, then continues past 11 into non-existent shards:

2026-03-13T16:53:53.676+0000 ... INFO: queue for topic: RGW11111111111111111:topic-uivxhh-2.11 already removed. nothing to do
...
2026-03-13T16:53:53.776+0000 ... INFO: queue for topic: RGW11111111111111111:topic-uivxhh-2.130 already removed. nothing to do
2026-03-13T16:53:53.776+0000 ... INFO: queue for topic: RGW11111111111111111:topic-uivxhh-2.131 already removed. nothing to do

And now there's a flood for deletions, reaching shard no 1.6M+:

2026-03-13T17:26:34.883+0000 ... 1961.242s sns:pubsub_topic_delete INFO: queue for topic: RGW11111111111111111:topic-uivxhh-2.1641335 already removed. nothing to do
2026-03-13T17:26:34.887+0000 ... 1961.246s sns:pubsub_topic_delete INFO: queue for topic: RGW11111111111111111:topic-uivxhh-2.1641336 already removed. nothing to do

As a result, as a part of period update commit (i.e., realm reload), front-end pause is initiated but never completes (we don't see "Frontend Paused" event):

2026-03-13T16:59:24.950+0000 ... rgw realm reloader: Pausing frontends for realm update...
2026-03-13T16:59:24.950+0000 ... frontend pausing, closing connections...

Root Cause

I believe the root-cause is the num_shards field in rgw_pubsub_dest was missing from JSON serialization functions (dump() and decode_json()), and the member variable had no default initializer. At the high level what is happening is

1. Zone A (master) creates a persistent topic with num_shards = 11 (from config rgw_bucket_persistent_notif_num_shards)
2. Metadata syncs to Zone B via JSON - but num_shards is not included in the JSON output because dump() didn't encode it
3. Zone B decodes the topic metadata - decode_json() doesn't read num_shards, leaving it with its uninitialized garbage value (e.g., 1641337)
4. When deleting the topic on Zone B, get_shard_names() iterates from 0 to num_shards-1, generating millions of shard names instead of 11
5. Each non-existent shard deletion triggers a RADOS operation that returns ENOENT ("already removed"), but the sheer volume (1.6M+ operations) takes minutes
6. This blocks frontends->pause() during realm reload, causing HTTP requests from other zones to timeout.

The fix would be

- to add encode_json("num_shards", num_shards, f) to dump() and
- to add JSONDecoder::decode_json("num_shards", num_shards, f) to decode_json()
- Looking at the decode, we can also add fallback default in binary decode() for backward compatibility with older struct versions.
Tested the proposed fix on teuthology ceph-ci::wip-oozmen-75466 which includes the proposed fix; it was sent for both "rgw" and "rgw:multisite" suites - which means 4 runs (since submissions are for 2 OS flavors - centOS and Ubuntu)

Looking at all 4 runs:
- test_period_update_commit now consistently passes because
- we don't see streaming events "sns:pubsub_topic_delete INFO: queue: RGW11111111111111111:topic-ptbiyv-1. <X> removed from queue list" anymore where X > 10 .

OO Updated by Oguzhan Ozmen 9 months ago Actions #2

  • Pull request ID set to 67798

OO Updated by Oguzhan Ozmen 9 months ago Actions #3

Just to re-iterate as it may not be clear above:

- Single-zone & Multisite but no persistent topics --> This issue cannot occur.
- Multisite with persistent topics, but only deleting on the master zone --> this is stil OK.
- The Multisite with persistent topics, deleting on secondary zones --> then this issue occurs.

OO Updated by Oguzhan Ozmen 9 months ago Actions #4

  • Backport set to tentacle

DG Updated by Daniel Gryniewicz 9 months ago Actions #5

  • Status changed from New to Fix Under Review

CB Updated by Casey Bodley 9 months ago Actions #6

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot 9 months ago Actions #7

  • Merge Commit set to ef86dd5fba1c4b1825fc71cbeb187d207945ccfc
  • Fixed In set to v20.3.0-6253-gef86dd5fba
  • Upkeep Timestamp set to 2026-03-20T16:58:09+00:00

UB Updated by Upkeep Bot 9 months ago Actions #8

  • Copied to Backport #75638: tentacle: rgw/qa/multisite: "test_period_update_commit" fails due to an earlier testcase (test_topic_notification_sync) added

UB Updated by Upkeep Bot 9 months ago Actions #9

  • Tags (freeform) set to backport_processed

OO Updated by Oguzhan Ozmen 8 months ago Actions #10

OO Updated by Oguzhan Ozmen 8 months ago Actions #11

  • Status changed from Pending Backport to Resolved
  • Backport deleted (tentacle)

Removing "tentacle" backport from the release field & marking this resolved since this tracker fixes a problem introduced in the Feature https://tracker.ceph.com/issues/71677 which won't be backported.

UB Updated by Upkeep Bot 3 months ago Actions #12

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-03-20T16:58:09+00:00 to 2026-08-28T01:41:15+00:00

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

  • Released In set to v21.2.0~988
  • Upkeep Timestamp changed from 2026-08-28T01:41:15+00:00 to 2026-10-24T02:01:18+00:00
Actions

Also available in: PDF Atom