Skip to content

rgw/bucket-logging: fix stale shadow log objects - #71616

Merged
yuvalif merged 1 commit into
ceph:mainfrom
nbalacha:wip-nbala-80362
Oct 12, 2026
Merged

yuvalif merged 1 commit into
ceph:mainfrom
nbalacha:wip-nbala-80362

Conversation

@nbalacha

@nbalacha nbalacha commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Resolves an issue where disabling logging on a bucket creates a shadow log record object without an associated head object. Although this object records the REST.PUT.LOGGING operation, it remains inaccessible through object listings.

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

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.

@nbalacha
nbalacha requested a review from a team as a code owner September 8, 2026 10:20
@nbalacha
nbalacha requested a review from yuvalif September 8, 2026 10:24
@nbalacha
nbalacha force-pushed the wip-nbala-80362 branch 2 times, most recently from 5e6e0c7 to 38f3634 Compare September 9, 2026 04:30
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@yuvalif

yuvalif commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@nbalacha how is this fix addressign the issue? if the rollover happens inside execute() and log_record() is called after?

@nbalacha

Copy link
Copy Markdown
Contributor Author

@nbalacha how is this fix addressign the issue? if the rollover happens inside execute() and log_record() is called after?

With this fix, the log_record gets the updated conf from s->bucket, so the new REST.PUT.LOGGING entry goes into the log record for the new target bucket.

@yuvalif

yuvalif commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@nbalacha how is this fix addressign the issue? if the rollover happens inside execute() and log_record() is called after?

With this fix, the log_record gets the updated conf from s->bucket, so the new REST.PUT.LOGGING entry goes into the log record for the new target bucket.

this is on a target change. the descriptions speaks about disabling bucket logging

@nbalacha

Copy link
Copy Markdown
Contributor Author

@nbalacha how is this fix addressign the issue? if the rollover happens inside execute() and log_record() is called after?

With this fix, the log_record gets the updated conf from s->bucket, so the new REST.PUT.LOGGING entry goes into the log record for the new target bucket.

this is on a target change. the descriptions speaks about disabling bucket logging

As the Standard log mode logs only on completion of the op, the REST.PUT.LOGGING is not logged as it finds the logging config attr is not present.

@yuvalif

yuvalif commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

As the Standard log mode logs only on completion of the op, the REST.PUT.LOGGING is not logged as it finds the logging config attr is not present.

do we need to update release notes? or what it never logged into an accessible location?

This fix addresses an issue where disabling logging for a bucket generates
an uncommitted shadow log record object that lacks a corresponding
head object. While this object logs the REST.PUT.LOGGING operation, it cannot
be accessed via object listings.
The issue occurs because RGWPutBucketLogging executes
RGWBucket::merge_and_store_attrs() on its local src_bucket instance. Because
this function only updates the specific bucket instance it is called on, the
logging configuration stored in s->bucket remains stale. Consequently,
log_record() uses the outdated configuration and writes to an incorrect log
object, which is never committed.

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

Signed-off-by: Nithya Balachandran <[email protected]>
@yuvalif

yuvalif commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@nbalacha

nbalacha commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Note to self : passed s3tests (bucket-logging) and bucket-logging.py on my local machine.

@anrao19

anrao19 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-10-06-07:38.

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-10-06-07:38.

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

@yuvalif
yuvalif merged commit 5648fba into ceph:main Oct 12, 2026
18 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.

3 participants