Skip to content

rgw/notification: Make the LifeCycle & Replication events AWS Compatible and Support s3:Replication:Delete event - #55795

Merged
cbodley merged 3 commits into
ceph:mainfrom
kchheda3:wip-rename-notif-events
Mar 20, 2024
Merged

cbodley merged 3 commits into
ceph:mainfrom
kchheda3:wip-rename-notif-events

Conversation

@kchheda3

@kchheda3 kchheda3 commented Feb 27, 2024 •

Copy link
Copy Markdown
Contributor

Make the LifeCycle and Replication events to be AWS compatible, also at same time support the original event name that was used by ceph for backward compatibility. So if an user subscribes bucket for both lifecycle events (ceph specific and aws compatible), it will get 2 events delivered.
Also as part of changes extend the support for Replication:Delete events.

Fixes tracker --> https://tracker.ceph.com/issues/64251

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@kchheda3
kchheda3 marked this pull request as ready for review February 27, 2024 20:23
@kchheda3
kchheda3 requested review from a team as code owners February 27, 2024 20:23
@yuvalif

yuvalif commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

as an alternative, you can keep the APIs with a single event type.
the code that encode/decode the event type can normalize to a the AWS version of events.
the downside of this solution would be that if someone configures the ceph event types, they would still see the AWS event type when the look at the event of fetch the configuration.

@kchheda3

Copy link
Copy Markdown
Contributor Author

as an alternative, you can keep the APIs with a single event type. the code that encode/decode the event type can normalize to a the AWS version of events. the downside of this solution would be that if someone configures the ceph event types, they would still see the AWS event type when the look at the event of fetch the configuration.

but how will the notification::match(), currently each s3 action/LC/replication action sends the event it wants to match, if user sets the aws and we only check for ceph it will not work.
then we also need to hack the notification::match() to check additional event if ceph_event is send which IMO is not great (i did think about it, but felt it was not great for readability and future references).
With this workflow you know exactly which events we are checking

@yuvalif

yuvalif commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

as an alternative, you can keep the APIs with a single event type. the code that encode/decode the event type can normalize to a the AWS version of events. the downside of this solution would be that if someone configures the ceph event types, they would still see the AWS event type when the look at the event of fetch the configuration.

but how will the notification::match(), currently each s3 action/LC/replication action sends the event it wants to match, if user sets the aws and we only check for ceph it will not work. then we also need to hack the notification::match() to check additional event if ceph_event is send which IMO is not great (i did think about it, but felt it was not great for readability and future references). With this workflow you know exactly which events we are checking

i don't suggest that. i thought we can normalize to the aws-style names - when we decode/encode the event name i nthe conf object.

@kchheda3

Copy link
Copy Markdown
Contributor Author

as an alternative, you can keep the APIs with a single event type. the code that encode/decode the event type can normalize to a the AWS version of events. the downside of this solution would be that if someone configures the ceph event types, they would still see the AWS event type when the look at the event of fetch the configuration.

but how will the notification::match(), currently each s3 action/LC/replication action sends the event it wants to match, if user sets the aws and we only check for ceph it will not work. then we also need to hack the notification::match() to check additional event if ceph_event is send which IMO is not great (i did think about it, but felt it was not great for readability and future references). With this workflow you know exactly which events we are checking

i don't suggest that. i thought we can normalize to the aws-style names - when we decode/encode the event name i nthe conf object.

So when the user sends put_bucket_notif and if user sends the ceph-specific we still store the aws-compatible and then during sending of event we just send the aws one ? did i understand correctly?

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.

should we document the fact that the S3 standard events are the recommended ones? (and long term the duplicate ceph extension notifications will be removed?)

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 think deprecating things is jumping the gun

@yuvalif

yuvalif commented Feb 29, 2024 •

Copy link
Copy Markdown
Contributor

as an alternative, you can keep the APIs with a single event type. the code that encode/decode the event type can normalize to a the AWS version of events. the downside of this solution would be that if someone configures the ceph event types, they would still see the AWS event type when the look at the event of fetch the configuration.

but how will the notification::match(), currently each s3 action/LC/replication action sends the event it wants to match, if user sets the aws and we only check for ceph it will not work. then we also need to hack the notification::match() to check additional event if ceph_event is send which IMO is not great (i did think about it, but felt it was not great for readability and future references). With this workflow you know exactly which events we are checking

i don't suggest that. i thought we can normalize to the aws-style names - when we decode/encode the event name i nthe conf object.

So when the user sends put_bucket_notif and if user sends the ceph-specific we still store the aws-compatible and then during sending of event we just send the aws one ? did i understand correctly?

yes. but thinking about that again, I'm not 100% sure...
it would simplify the fast path (which is alway good), but would require some changes to the test code, and might come as a surprise to users as they will get back a different value than the one they set - this might break someones code that expect to get the ceph specific values when consuming the notifications.

@kchheda3

kchheda3 commented Mar 1, 2024

Copy link
Copy Markdown
Contributor Author

@ceph/doc-writers can you take look at the PR?

@mattbenjamin
mattbenjamin self-requested a review March 1, 2024 18:19

@mattbenjamin mattbenjamin 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.

I have no objections here, but please avoid editorializing in the doc, and proposing there that the initial notification names are being deprecated

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 think deprecating things is jumping the gun

@kchheda3

kchheda3 commented Mar 1, 2024

Copy link
Copy Markdown
Contributor Author

I have no objections here, but please avoid editorializing in the doc, and proposing there that the initial notification names are being deprecated

we haven't added/updated any doc mentioning about the deprecation

@yuvalif

yuvalif commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

I have no objections here, but please avoid editorializing in the doc, and proposing there that the initial notification names are being deprecated

we haven't added/updated any doc mentioning about the deprecation

agree we should not deprecate.
but since we have now 2 sets of event types that do the same thing, we may want to recommend using the more standard ones?

@github-actions

github-actions Bot commented Mar 8, 2024

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 Mar 11, 2024

Copy link
Copy Markdown
Contributor

@kchheda3,

  • could you please do a rebase instead of merge, and do the rebase fixes as part of the original commits?
  • do we plan on adding a comment in the doc regarding which event names are reccomended (no need to deprecate anything)?

@mattbenjamin

Copy link
Copy Markdown
Contributor

@yuvalif I do not follow what the point is. There is no need to recommend users to use AWS event names.

@yuvalif

yuvalif commented Mar 11, 2024

Copy link
Copy Markdown
Contributor

@yuvalif I do not follow what the point is. There is no need to recommend users to use AWS event names.

we have 2 sets of events that do the same thing. if we don't recommend one set, or explain that they are the same, users will ask what is the difference.
i think we should add something in the doc to prevent this confusion.

@kchheda3
kchheda3 force-pushed the wip-rename-notif-events branch from 7732763 to e392cb1 Compare March 11, 2024 20:10
@kchheda3

Copy link
Copy Markdown
Contributor Author

@yuvalif I do not follow what the point is. There is no need to recommend users to use AWS event names.

we have 2 sets of events that do the same thing. if we don't recommend one set, or explain that they are the same, users will ask what is the difference. i think we should add something in the doc to prevent this confusion.

@yuvalif @mattbenjamin Lemme know if i should go ahead and write the recommended section for sending LC/Replication events in the doc ?

@yuvalif

yuvalif commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

@yuvalif I do not follow what the point is. There is no need to recommend users to use AWS event names.

we have 2 sets of events that do the same thing. if we don't recommend one set, or explain that they are the same, users will ask what is the difference. i think we should add something in the doc to prevent this confusion.

@yuvalif @mattbenjamin Lemme know if i should go ahead and write the recommended section for sending LC/Replication events in the doc ?

the AWS names are more "standard", but, OTOH, they don't cover all of the cases.
so, we should not recommend any of the sets, just say which is equivalent to which in the "note" column. e.g.

| s3:LifecycleExpiration:Delete              | Supported. Equivalent to: s3:ObjectLifecycle:Expiration:Current
| s3:LifecycleExpiration:DeleteMarkerCreated | Supported. Equivalent to: s3:ObjectLifecycle:Expiration:DeleteMarker
| s3:LifecycleExpiration:*                   | Supported. Equivalent to: s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated
| s3:LifecycleTransition                     | Supported. Equivalent to: s3:ObjectLifecycle:Transition:Current

similarly, for the replication event names

@mattbenjamin

Copy link
Copy Markdown
Contributor

works for me, thanks @yuvalif

@kchheda3
kchheda3 force-pushed the wip-rename-notif-events branch from e392cb1 to e08a63b Compare March 12, 2024 14:04
@kchheda3
kchheda3 force-pushed the wip-rename-notif-events branch from e08a63b to 837b431 Compare March 13, 2024 15:18
@kchheda3

Copy link
Copy Markdown
Contributor Author

@ceph/doc-writers can someone take a look at the docs

@anthonyeleven

Copy link
Copy Markdown
Contributor

I don't see much in there for doc input

@kchheda3
kchheda3 removed request for a team and anthonyeleven March 14, 2024 20:03
@cbodley
cbodley merged commit b77f765 into ceph:main Mar 20, 2024
@kchheda3
kchheda3 deleted the wip-rename-notif-events branch March 20, 2024 13:44
kchheda3 added a commit to kchheda3/ceph that referenced this pull request Jun 12, 2024
…s for processing for object tag decode errors.

This was the behavior prior to ceph#55795, however while refactoring this behavior was changed, hence revert back the logic to not send the events if the obj_tag decoding fails.

Signed-off-by: kchheda3 <[email protected]>
yuvalif pushed a commit to kchheda3/ceph that referenced this pull request Jul 18, 2024
…s for processing for object tag decode errors.

This was the behavior prior to ceph#55795, however while refactoring this behavior was changed, hence revert back the logic to not send the events if the obj_tag decoding fails.

Signed-off-by: kchheda3 <[email protected]>
(cherry picked from commit 02295f9)
afreen23 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Jul 29, 2026
…s for processing for object tag decode errors.

This was the behavior prior to ceph#55795, however while refactoring this behavior was changed, hence revert back the logic to not send the events if the obj_tag decoding fails.

Signed-off-by: kchheda3 <[email protected]>
(cherry picked from commit a40a20f)
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.

6 participants