Skip to content

rgw/restore: Add notifications for restore events#65023

Merged
yuvalif merged 2 commits intoceph:mainfrom
soumyakoduri:wip-skoduri-restore-notification
Nov 11, 2025
Merged

rgw/restore: Add notifications for restore events#65023
yuvalif merged 2 commits intoceph:mainfrom
soumyakoduri:wip-skoduri-restore-notification

Conversation

@soumyakoduri
Copy link
Copy Markdown
Contributor

The following notification events are added for restore operations as stated
in https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and->

s3:ObjectRestore:*
s3:ObjectRestore:Post
s3:ObjectRestore:Completed
s3:ObjectRestore:Delete

By using the ObjectRestore event types, you can receive notifications for event initiation and
completion when restoring objects from the S3 Glacier Flexible Retrieval storage class,
S3 Glacier Deep Archive storage class, S3 Intelligent-Tiering Archive Access tier, and
S3 Intelligent-Tiering Deep Archive Access tier. You can also receive notifications for when >

The s3:ObjectRestore:Post event type notifies you of object restoration initiation. The s3:Ob>
event type notifies you of restoration completion. The s3:ObjectRestore:Delete event type not>
the temporary copy of a restored object expires.

Fixes: https://tracker.ceph.com/issues/69203
Signed-off-by: Soumya Koduri skoduri@redhat.com

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

@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Aug 14, 2025

@soumyakoduri follwoing commenst are only regarding: 6693ad1

@soumyakoduri
Copy link
Copy Markdown
Contributor Author

@soumyakoduri follwoing commenst are only regarding: 6693ad1

* do you plan on implementing the Init/Complete events as well?

Thank Yuval. Could you please elaborate on Init/Complete events?

rgw::notify::ObjectRestoreInitiated and rgw::notify::ObjectRestoreCompleted are already handled in rgw_restore.cc in the same commit.

@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Aug 14, 2025

@soumyakoduri follwoing commenst are only regarding: 6693ad1

* do you plan on implementing the Init/Complete events as well?

Thank Yuval. Could you please elaborate on Init/Complete events?

rgw::notify::ObjectRestoreInitiated and rgw::notify::ObjectRestoreCompleted are already handled in rgw_restore.cc in the same commit.

apologize. i see it now

Comment thread src/rgw/rgw_restore.cc
@anthonyeleven
Copy link
Copy Markdown
Contributor

I suspect that the title should read “notifications”

Comment thread doc/radosgw/cloud-restore.rst Outdated
This will restore the object ``doc1.rtf`` at an optional version,
for the duration of 10 days.

.. note:: Once restored, the restoration period of these temporary copies can be updated by reissuing the request with a new period.
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.

I would remove "Once restored," and capitalize The

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This particular commit changes are actually part of #64804 .. I shall address al your comments in that PR..

Comment thread qa/rgw/s3tests-branch.yaml Outdated
overrides:
s3tests:
force-branch: ceph-master
force-repo: https://github.com/soumyakoduri/s3-tests.git
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.

Is it appropriate to have merged code refer to your personal fork?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was added to test private s3-tests repo in teuthology. This particular enhancement is actually on top of #64804 and #64933 .. I will rebase this once they are merged.. till then will mark it WIP.

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.

Ack. Won't pretend to understand these dynamics, but it seemed unusual so I had to ask.

Comment thread src/rgw/driver/rados/rgw_rados.cc Outdated
}
delete_at = expiration_date;

ldpp_dout(dpp, 5) << "Setting Restore expiry time to: " << expiration_date << " , restore_time: " << restore_time << ", restore_interval: " << cct->_conf->rgw_restore_debug_interval << dendl;
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.

/expiry/expiration/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will address in #64804

@soumyakoduri soumyakoduri changed the title rgw/restore: Add nitifications for restore events rgw/restore: Add notifications for restore events Aug 15, 2025
@soumyakoduri soumyakoduri changed the title rgw/restore: Add notifications for restore events [WIP] rgw/restore: Add notifications for restore events Aug 15, 2025
@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

@soumyakoduri soumyakoduri force-pushed the wip-skoduri-restore-notification branch from 6693ad1 to 12b0610 Compare October 13, 2025 11:38
@soumyakoduri soumyakoduri force-pushed the wip-skoduri-restore-notification branch from 12b0610 to 01fc9c8 Compare October 14, 2025 18:00
@soumyakoduri soumyakoduri changed the title [WIP] rgw/restore: Add notifications for restore events rgw/restore: Add notifications for restore events Oct 14, 2025
@soumyakoduri
Copy link
Copy Markdown
Contributor Author

soumyakoduri commented Oct 14, 2025

With the changes events received are as below -

`Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:44:42.208542Z","eventName":"ObjectRestore:Post","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"0A8CEE68FC766E0C","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463882.208566.","opaqueData":""}]}

Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:44:42.208542Z","eventName":"ObjectRestore:*","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"0A8CEE686023A60C","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463882.212214.","opaqueData":""}]}

Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:44:45.205075Z","eventName":"ObjectRestore:Completed","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"0D8CEE68774B390C","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463885.205081.","opaqueData":""}]}

Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:44:45.205075Z","eventName":"ObjectRestore:*","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"0D8CEE6809C4520C","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463885.206750.","opaqueData":""}]}

Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:46:28.066238Z","eventName":"ObjectRestore:Delete","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"748CEE68C0D0F203","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463988.066244.","opaqueData":""}]}

Body:
{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-14T17:46:28.066238Z","eventName":"ObjectRestore:*","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"748CEE688E962504","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760463988.069572.","opaqueData":""}]}

`

Comment thread src/rgw/driver/rados/rgw_sal_rados.cc
Comment thread src/rgw/rgw_restore.cc Outdated
Comment thread src/rgw/rgw_restore.cc Outdated
@@ -663,6 +729,25 @@ int Restore::restore_obj_from_cloud(rgw::sal::Bucket* pbucket,
}

ldpp_dout(this, 10) << __PRETTY_FUNCTION__ << ": Restore of object " << pobj->get_key() << " is in progress." << dendl;

auto& attrs = pobj->get_attrs();
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.

yop can put this section inside the if (notify) block, so we don't do that unnecessarily

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.

do we expect to have size and etag during init?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

size will be non-zero only when restore is complete. Otherwise it remains '0' during init and after expiry. But etag should always be present. I fixed it now.

Comment thread src/rgw/rgw_restore.cc Outdated
Comment thread src/rgw/rgw_restore.cc Outdated
@@ -625,6 +675,22 @@ int Restore::restore_obj_from_cloud(rgw::sal::Bucket* pbucket,
return -EINVAL;
}

auto notify = driver->get_notification(
dpp, pobj, nullptr,
{rgw::notify::ObjectRestoreInitiated, rgw::notify::ObjectRestore},
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.

Suggested change
{rgw::notify::ObjectRestoreInitiated, rgw::notify::ObjectRestore},
{rgw::notify::ObjectRestoreInitiated},

specific type is known

Comment thread src/rgw/rgw_restore.cc
@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Oct 15, 2025

in "complete" event:

Body:
{"Records":
[
{"eventVersion":"2.2",
"eventSource":"ceph:s3",
"awsRegion":"default",
"eventTime":"2025-10-14T17:44:45.205075Z",
"eventName":"ObjectRestore:Completed",
"userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"44114-default-default"},
"s3":{
  "s3SchemaVersion":"1.0",
  "configurationId":"notify-http",
  "bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},
  "object":{"key":"h1","size":0,"eTag":"","versionId":"","sequencer":"0D8CEE68774B390C","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},
"eventId":"1760463885.205081.",
"opaqueData":""}
]
}

we expect size and etag to exist?

Comment thread src/rgw/driver/rados/rgw_sal_rados.cc
@soumyakoduri
Copy link
Copy Markdown
Contributor Author

Thanks Yuval. I fixed the etag value. It was not being read correctly. Regarding size , it should be non-zero post restore is completed. Fixed that as well. Here are the sample notifications now -

{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-16T19:28:42.346032Z","eventName":"ObjectRestore:Post","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"64110-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h2","size":0,"eTag":""6f5902ac237024bdd0c176cb93063dc4"","versionId":"","sequencer":"6A47F168F79BA014","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760642922.346070."6f5902ac237024bdd0c176cb93063dc4"","opaqueData":""}]}

{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-16T19:28:45.813023Z","eventName":"ObjectRestore:Completed","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"64110-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h2","size":12,"eTag":""6f5902ac237024bdd0c176cb93063dc4"","versionId":"","sequencer":"6D47F1682FE77530","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760642925.813033."6f5902ac237024bdd0c176cb93063dc4"","opaqueData":""}]}

{"Records":[{"eventVersion":"2.2","eventSource":"ceph:s3","awsRegion":"default","eventTime":"2025-10-16T19:30:26.532052Z","eventName":"ObjectRestore:Delete","userIdentity":{"principalId":"rgw restore"},"requestParameters":{"sourceIPAddress":""},"responseElements":{"x-amz-request-id":"0","x-amz-id-2":"64116-default-default"},"s3":{"s3SchemaVersion":"1.0","configurationId":"notify-http","bucket":{"name":"bucket1","ownerIdentity":{"principalId":"testid"},"arn":"arn:aws:s3:default::bucket1","id":"f46ae69f-ea94-4dda-8fad-ea81f2dd2a98.4179.1"},"object":{"key":"h2","size":0,"eTag":""6f5902ac237024bdd0c176cb93063dc4"","versionId":"","sequencer":"D247F168F05BB71F","metadata":[{"key":"x-amz-meta-s3cmd-attrs","val":"atime:1760366604/ctime:1709487143/gid:0/gname:root/md5:6f5902ac237024bdd0c176cb93063dc4/mode:33188/mtime:1709487143/uid:0/uname:root"}],"tags":[]}},"eventId":"1760643026.532110."6f5902ac237024bdd0c176cb93063dc4"","opaqueData":""}]}

127.0.0.1 - - [17/Oct/2025 01:00:26] "POST / HTTP/1.1" 200 -

Comment thread src/rgw/driver/rados/rgw_rados.cc Outdated
@@ -5693,7 +5693,8 @@ int RGWRados::restore_obj_from_cloud(RGWLCCloudTierCtx& tier_ctx,
return ret;
}

return ret;
// this returned size can be used to send bucket notification
return accounted_size;
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.

where is this being used?
note that this changes the semantics of the return value, and may break callers that interpret ret == 0 or !ret as "success"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

in process_restore_entry() this value is returned:
https://github.com/soumyakoduri/ceph/blob/394d2afff91e4ccc8c6ee9f5d60e7ee5f5e46ec1/src/rgw/rgw_restore.cc#L555

and later on this return value is checked with !ret which would fail for positive integers:
https://github.com/soumyakoduri/ceph/blob/394d2afff91e4ccc8c6ee9f5d60e7ee5f5e46ec1/src/rgw/rgw_restore.cc#L378-L380

i think it would be much safer to return zero on sucess, and return the as a by ref parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ack. Will update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed this. Kindly review.

@yuvalif yuvalif self-requested a review October 28, 2025 20:15
@soumyakoduri soumyakoduri force-pushed the wip-skoduri-restore-notification branch from 394d2af to d8520f0 Compare November 3, 2025 08:49
@yuvalif yuvalif added needs-qa and removed tests labels Nov 3, 2025
@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Nov 3, 2025

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@soumyakoduri
Copy link
Copy Markdown
Contributor Author

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@yuvalif ...sure.. I couldn't find any cloud-transition related tests to extend them for restore. Yes! that may take some time and need to be addressed separately.

@soumyakoduri
Copy link
Copy Markdown
Contributor Author

jenkins test api

@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Nov 3, 2025

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@yuvalif ...sure.. I couldn't find any cloud-transition related tests to extend them for restore. Yes! that may take some time and need to be addressed separately.

what is the basic test suite for the "restore" feature?
if you point me to that I will be able to assist in adding notification tests.

Copy link
Copy Markdown
Contributor

@anthonyeleven anthonyeleven left a comment

Choose a reason for hiding this comment

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

docs lgtm

Comment thread src/rgw/rgw_restore.cc Outdated
Comment thread src/rgw/rgw_restore.cc Outdated
@soumyakoduri
Copy link
Copy Markdown
Contributor Author

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@yuvalif ...sure.. I couldn't find any cloud-transition related tests to extend them for restore. Yes! that may take some time and need to be addressed separately.

what is the basic test suite for the "restore" feature? if you point me to that I will be able to assist in adding notification tests.

currently, we have cloud-transition and cloud-restore tests running as part of cloud-transition test-suite https://github.com/ceph/ceph/tree/main/qa/suites/rgw/cloud-transition/tasks

@soumyakoduri soumyakoduri force-pushed the wip-skoduri-restore-notification branch from d8520f0 to ffe1003 Compare November 3, 2025 17:11
@soumyakoduri
Copy link
Copy Markdown
Contributor Author

jenkins test docs

The following notification events are added for restore operations as stated
in https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html

s3:ObjectRestore:*
s3:ObjectRestore:Post
s3:ObjectRestore:Completed
s3:ObjectRestore:Delete

By using the ObjectRestore event types, you can receive notifications for event initiation and
completion when restoring objects from the S3 Glacier Flexible Retrieval storage class,
S3 Glacier Deep Archive storage class, S3 Intelligent-Tiering Archive Access tier, and
S3 Intelligent-Tiering Deep Archive Access tier. You can also receive notifications for when the restored copy of an object expires.

The s3:ObjectRestore:Post event type notifies you of object restoration initiation. The s3:ObjectRestore:Completed
event type notifies you of restoration completion. The s3:ObjectRestore:Delete event type notifies you when
the temporary copy of a restored object expires.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Include `size` param in the restore API to read the actual object
size once restore is completed. This is needed to send bucket
notification to the client.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
@soumyakoduri soumyakoduri force-pushed the wip-skoduri-restore-notification branch from ffe1003 to 5e2d2b5 Compare November 4, 2025 08:33
@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Nov 4, 2025

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@yuvalif ...sure.. I couldn't find any cloud-transition related tests to extend them for restore. Yes! that may take some time and need to be addressed separately.

what is the basic test suite for the "restore" feature? if you point me to that I will be able to assist in adding notification tests.

currently, we have cloud-transition and cloud-restore tests running as part of cloud-transition test-suite https://github.com/ceph/ceph/tree/main/qa/suites/rgw/cloud-transition/tasks

if this is currently part of s3tests and does not have any RGW specific test code, we would probably need to either add a restore specific suite, or add that to the bucket_notification suite (and borrow the code and setup from the "cloud_restore" code in s3tests.
either way, won't be in scope here.

@soumyakoduri
Copy link
Copy Markdown
Contributor Author

jenkins test windows

@anrao19
Copy link
Copy Markdown
Contributor

anrao19 commented Nov 11, 2025

Pr testing completed , Approved by @ivancich details are in :https://tracker.ceph.com/issues/73724,
@soumyakoduri , Please let me know if no further testing needed if not we can merge the pr

@yuvalif yuvalif merged commit b56fccc into ceph:main Nov 11, 2025
13 checks passed
@yuvalif
Copy link
Copy Markdown
Contributor

yuvalif commented Nov 11, 2025

@soumyakoduri (could be done in another PR) but we probably need to add tests for this usecase

@yuvalif ...sure.. I couldn't find any cloud-transition related tests to extend them for restore. Yes! that may take some time and need to be addressed separately.

what is the basic test suite for the "restore" feature? if you point me to that I will be able to assist in adding notification tests.

currently, we have cloud-transition and cloud-restore tests running as part of cloud-transition test-suite https://github.com/ceph/ceph/tree/main/qa/suites/rgw/cloud-transition/tasks

if this is currently part of s3tests and does not have any RGW specific test code, we would probably need to either add a restore specific suite, or add that to the bucket_notification suite (and borrow the code and setup from the "cloud_restore" code in s3tests. either way, won't be in scope here.

created tracker for this: https://tracker.ceph.com/issues/73780

@soumyakoduri soumyakoduri deleted the wip-skoduri-restore-notification branch March 6, 2026 09:09
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