Skip to content

rgw: fix period's sync_status during failover/failback - #71707

Merged
anrao19 merged 2 commits into
ceph:mainfrom
smanjara:wip-fix-failback
Oct 13, 2026
Merged

anrao19 merged 2 commits into
ceph:mainfrom
smanjara:wip-fix-failback

Conversation

@smanjara

Copy link
Copy Markdown
Contributor

https://tracker.ceph.com/issues/80439

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

to prevent out-of-bounds access

sync_status can be empty during a failback.

Signed-off-by: Shilpa Jagannath <[email protected]>
@smanjara
smanjara requested a review from a team as a code owner September 10, 2026 21:59
@github-actions github-actions Bot added the rgw label Sep 10, 2026
@smanjara
smanjara requested a review from cbodley September 10, 2026 22:00

@cbodley cbodley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still curious why RGWPeriod::sync_status isn't being populated in this case

@smanjara

Copy link
Copy Markdown
Contributor Author

still curious why RGWPeriod::sync_status isn't being populated in this case

ack. I'm still debugging that part.

@smanjara smanjara changed the title rgw: guard sync_status shard lookup during failback rgw: fix period's sync_status during failover/failback Sep 16, 2026
@smanjara

Copy link
Copy Markdown
Contributor Author

still curious why RGWPeriod::sync_status isn't being populated in this case

ack. I'm still debugging that part.

it appears that period commit command loads the local zonegroup that already has master_zone set to the local zone before a commit. (https://github.com/ceph/ceph/blob/main/src/rgw/radosgw-admin/radosgw-admin.cc#L4797). with is_meta_master() being true, we'd simply skip updating the period's sync status.

…zone change

period update --commit after `zone modify --master` already treats this
zone as meta master, so RGWMetaSyncStatusManager does not read
mdlog.sync-status and the new period stores an empty sync_status. other
zones can incorrectly read that empty status.

read mdlog sync status from the local zone in the update_sync_status()
method which is called only when the period's master zone changes.

add a test case for failover/failback
Signed-off-by: Shilpa Jagannath <[email protected]>
@anrao19

anrao19 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-28-05:23.

@anrao19

anrao19 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-28-05:23.

pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/80952
@smanjara , if no further testing is need then this pr can be merged

@anrao19
anrao19 merged commit 21ba3d6 into ceph:main Oct 13, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/38349091362

@lumir-sliva

Copy link
Copy Markdown
Contributor

@smanjara I opened a tentacle backport for this, #72687, and set the Backport
field on https://tracker.ceph.com/issues/80439 (it was empty, so the bot didn't
create one at merge). The second commit needed a small hand port, rgw_period.cc
still lives under driver/rados there. Could you take a look?

Squid doesn't need it: there RGWSI_Zone still loads the zonegroup from the
current period, so the promoting zone isn't meta master yet during its own
commit and the period gets the full sync_status. Tentacle changed that in
v20.2.2 with the backport of the RGWSI_Zone startup cleanup (203aa43), which
is what makes the empty sync_status possible there. Details on the tracker.

Some data from 20.2.4, since that's what I tested on: two clusters, 4 gateways
per zone. Stock 20.2.4 refuses the promotion with a false "N period(s) behind",
and with --yes-i-really-mean-it all 4 gateways of the surviving zone crash in
the meta sync thread on failback (16 restarts each in 120 s, 502 for clients).
With these two commits promotion and failback are clean.

Two related bugs showed up in the same tests, both fixed separately:
#72669 (a refused commit still pushes the
staging period) and #72670 (metadata sync
stuck on a past period with more than one sync gateway, and a past period cut
off after 100 entries per shard).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants