Skip to content

umbrella: rgw: redirect to the endpoint of the bucket's zonegroup - #71524

Merged
batrick merged 2 commits into
ceph:umbrellafrom
RaminNietzsche:wip-80250-umbrella
Sep 28, 2026
Merged

batrick merged 2 commits into
ceph:umbrellafrom
RaminNietzsche:wip-80250-umbrella

Conversation

@RaminNietzsche

@RaminNietzsche RaminNietzsche commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Backport of #70931 to umbrella.

In multi-zonegroup deployments, a request for a bucket that lives in another
zonegroup can reach a gateway that does not hold the bucket.
rgw_build_bucket_policies() returns ERR_PERMANENT_REDIRECT, but
s->zonegroup_endpoint was taken from the local zonegroup. The
Location header then pointed clients back at the same gateway, causing
redirect loops (see tracker #64983).

Add rgw::find_zonegroup_by_id() and use the bucket's zonegroup endpoint
for the redirect instead. If that zonegroup is not part of the current
period, leave the endpoint empty and log the reason.

Why umbrella: the regression (e2eb66a) is present on umbrella; the same
redirect loop fixed on main affects multi-zonegroup RGW deployments here.

Minimal change: cherry-pick of both commits from PR #70931 with
git cherry-pick -x. No manual conflict resolution was required.

Original bug: https://tracker.ceph.com/issues/64983
Main PR: #70931 (merged as ea93efc)
Official backport tracker: https://tracker.ceph.com/issues/80267

Testing

  • Includes unittest_rgw_zone (cherry-picked from main PR)
  • Jenkins make check passed (ceph-pr-pipeline/568)
  • Not run locally on umbrella yet

Contribution Guidelines

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)

Fixes: https://tracker.ceph.com/issues/80267

rgw_build_bucket_policies() returns ERR_PERMANENT_REDIRECT when a request
reaches a zonegroup that does not hold the bucket, but s->zonegroup_endpoint
was read from the local zonegroup. abort_early() builds the Location header
from that endpoint, so the client was redirected back to the gateway it had
just used. Clients that follow redirects then retry in a tight loop.

Look the bucket's zonegroup up in the current period and take the endpoint
from there instead. If that zonegroup is not part of the period, leave the
endpoint empty and log the reason rather than pointing the client at itself.

This also restores Request.ZoneGroup.Name and Request.ZoneGroup.Endpoint in
lua scripts to the bucket's zonegroup, which is what they reported before
the endpoint lookup was dropped.

Fixes: http://tracker.ceph.com/issues/64983
Fixes: e2eb66a
Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 7652d66)
Add unittest_rgw_zone for rgw::get_zonegroup_endpoint() and the new
rgw::find_zonegroup_by_id(), including the case that caused the redirect
loop: a bucket in another zonegroup must resolve to that zonegroup's
endpoint and not the local one.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 19ecc26)
@RaminNietzsche
RaminNietzsche requested a review from a team as a code owner September 3, 2026 13:55
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Sep 3, 2026
@RaminNietzsche

Copy link
Copy Markdown
Member Author

@ceph/ceph-release-manager @adamemerson — sorry for the tracker linkage noise on this backport.

After a fix lands on main, I usually open stable backports myself with git cherry-pick -x from the merged commits. The cherry-picks here are clean and commit parity looks correct; the Backport Audit failure is on the Redmine side, not the code.

I do not have maintainer-level tracker access. I can create issues and set some fields on issues I own, but I cannot reliably wire up the parent/backport relations or update fields on the original bug tracker that releng-audit expects. That led to duplicate parent trackers and backport issues that are not linked the way the audit checks for.

I am adjusting my local backport workflow so I wait for the official Upkeep backport trackers (or ask a maintainer to link them) before opening stable PRs, instead of creating parallel tracker entries on my own.

Thanks for your patience, and sorry for the extra cleanup for release managers. Happy to adjust anything else that would help get this merged.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

/audit retest

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🔄 Audit Retest Triggered by @RaminNietzsche.

View workflow run

@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Sep 3, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Sep 3, 2026
@mheler

mheler commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@RaminNietzsche could you please use ceph-backport.sh for these backports?

Please note that any deviation in the commits, do need to be noted with a "Conflict:" statement in the commit and the changes made for the commit to pass that conflict.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

/audit restart

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

🔄 Audit Retest Triggered by @RaminNietzsche.

View workflow run

@github-actions github-actions Bot added releng-audit-fail Release engineering: failed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels Sep 6, 2026
github-actions[bot]

This comment was marked as outdated.

@mheler

mheler commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@RaminNietzsche you need to change the status of https://tracker.ceph.com/issues/80267 to be 'pending review' then add the PR number to it.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

@mheler I don't appear to have permission to update the Backport tracker fields on https://tracker.ceph.com/issues/80267 — I can't set Status to Pending Review or fill in Pull request ID (71524). Could you update those fields, or point me to how to get the needed tracker permissions? Thanks.

@mheler mheler removed releng-audit-fail Release engineering: failed backport verification audit. ci-approved labels Sep 6, 2026
@github-actions github-actions Bot added the releng-audit-pass Release engineering: passed backport verification audit. label Sep 6, 2026
@anrao19

anrao19 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to umbrella integration testing by anuchaithra started 2026-09-10-10:14.

@ivancich

Copy link
Copy Markdown
Member

This passed QA here: https://tracker.ceph.com/issues/80446

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@batrick
batrick merged commit 1a21f6c into ceph:umbrella Sep 28, 2026
29 of 30 checks passed
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.

5 participants