Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGW: add admin interfaces to get and delete notifications by bucket #51408

Merged
merged 1 commit into from May 29, 2023

Conversation

AliMasarweh
Copy link
Contributor

@AliMasarweh AliMasarweh commented May 9, 2023

RGW: add admin interfaces to get and delete notifications by bucket
https://tracker.ceph.com/issues/52980

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)
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

@AliMasarweh AliMasarweh requested a review from a team as a code owner May 9, 2023 15:03
@github-actions github-actions bot added the rgw label May 9, 2023
src/rgw/rgw_admin.cc Outdated Show resolved Hide resolved
src/rgw/rgw_admin.cc Outdated Show resolved Hide resolved
src/rgw/rgw_admin.cc Outdated Show resolved Hide resolved
src/rgw/rgw_rest_pubsub.cc Outdated Show resolved Hide resolved
src/rgw/rgw_pubsub.cc Outdated Show resolved Hide resolved
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch 2 times, most recently from 3fb4bb6 to 0476da6 Compare May 10, 2023 17:25
@yuvalif
Copy link
Contributor

yuvalif commented May 10, 2023

can you please paste sample outputs for the "get" and "list" commands?

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch 10 times, most recently from a759fd7 to 77e6190 Compare May 11, 2023 20:56
@AliMasarweh
Copy link
Contributor Author

[alimasa@folio11 build]$ bin/radosgw-admin notification list --bucket fish { "notifications": [ { "TopicArn": "arn:aws:sns:default::fishtopic", "Id": "notif1", "Events": [ "s3:ObjectCreated:*", "s3:ObjectRemoved:*" ], "Filter": { "S3Key": {}, "S3Metadata": {}, "S3Tags": {} } } ] } [alimasa@folio11 build]$ bin/radosgw-admin notification get --notification-id notif1 --bucket fish { "TopicArn": "arn:aws:sns:default::fishtopic", "Id": "notif1", "Events": [ "s3:ObjectCreated:*", "s3:ObjectRemoved:*" ], "Filter": { "S3Key": {}, "S3Metadata": {}, "S3Tags": {} } }
outputs for the "get" and "list" commands

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch from 77e6190 to 1060300 Compare May 11, 2023 21:05
@yuvalif
Copy link
Contributor

yuvalif commented May 14, 2023

please make sure that you update: src/test/cli/radosgw-admin/help.t with the changes to radosgw-admin --help

@yuvalif
Copy link
Contributor

yuvalif commented May 14, 2023

please add integration test.
please look at: src/test/rgw/bucket_notification/test_bn.py at the test_ps_s3_topic_admin_on_master() function and create a similar function for the notifications CLI

@yuvalif
Copy link
Contributor

yuvalif commented May 14, 2023

when bucket-id parameter is not provided to radosgw-admin notification rm we get the following error message:

ERROR: could not init bucket: 2023-05-14T10:23:58.847+0000 7f2d253dd780  0 ERROR: obj.oid is empty

instead of an error message stating that the bucket-id parameter is missing.
similar to what we receive we calling "notification get/list" without a bucket:

ERROR: bucket name was not provided (via --bucket)

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch from c635ba2 to 78da289 Compare May 22, 2023 14:11
@github-actions github-actions bot added the tests label May 22, 2023
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch 2 times, most recently from ca9e9c5 to 541ad4d Compare May 23, 2023 13:21
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch 3 times, most recently from a2461ea to 0fef091 Compare May 25, 2023 11:37
Signed-off-by: Ali Masarwa <ali.saed.masarwa@gmail.com>
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-topics-op-by-bucket branch from 0fef091 to b0307db Compare May 28, 2023 14:09
@AliMasarweh AliMasarweh merged commit 4b94e87 into ceph:main May 29, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants