Bug #48369
opennotification: get/delete of specific notification does not work
0%
Description
note that this is an extension to the AWS API, for the next steps to work, follow the instructions here:
https://github.com/ceph/ceph/tree/master/examples/boto3
to reproduce:
(1) start a vstart cluster
(2) create 2 topics:
aws --endpoint-url http://localhost:8000 sns create-topic --name fishtopic --attributes='{"push-endpoint": "amqp://127.0.0.1:5672", "amqp-exchange": "ex1", "amqp-ack-level": "broker"}'
(3) create a bucket:
aws --endpoint-url http://localhost:8000 s3 mb s3://fish
(4) create 2 notifications on that bucket:
aws --region=default --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"]}]}' aws --region=default --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "deletion-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectRemoved:*"]}]}'
(5) try to get a specific notification:
aws --region=default --endpoint-url http://localhost:8000 s3api get-bucket-notification-configuration --bucket fish --notification "creation-notif"
expected result:
{ "TopicConfigurations": [ { "Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"] } ] }
actual result:
{ "TopicConfigurations": [ { "Id": "creation-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectCreated:*"] }, { "Id": "deletion-notif", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": ["s3:ObjectRemoved:*"] } ] }
(6) try to delete a specific notification:
aws --region=default --endpoint-url http://localhost:8000 s3api delete-bucket-notification-configuration --bucket fish --notification "creation-notif"
(7) fetch notifications and expect to see only "deletion-notif"
actual results: both notifications are deleted
Updated by Yuval Lifshitz over 3 years ago
- Priority changed from Normal to Low
- Severity changed from 3 - minor to 4 - irritation
this is working and tested: https://github.com/ceph/ceph/blob/master/src/test/rgw/rgw_multi/tests_ps.py#L953
failing only when used via aws CLI. since this is a non-standard extension it may not be possible to make it work, but needs more investigation.
maybe doable via modification to: https://github.com/ceph/ceph/blob/master/examples/boto3/service-2.sdk-extras.json
Updated by Yuval Lifshitz about 3 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 39945