- start a vstart cluster
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
- create two tenanted users:
bin/radosgw-admin user create --display-name "Hello World" --tenant world --uid hello --access_key hello --secret_key world
bin/radosgw-admin user create --display-name "Ka Boom" --tenant boom --uid ka --access_key ka --secret_key boom
- create topic, bucket and notification for one of the users:
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \\n --attributes='{"push-endpoint": "http://localhost:10900", "persistent": "true"}'
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 s3 mb s3://fish
AWS_ACCESS_KEY_ID=ka AWS_SECRET_ACCESS_KEY=boom aws --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration \\n --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "notif1", "TopicArn": "arn:aws:sns:default:boom:fishtopic", "Events": []}]}'
- create topic, bucket and notification for other user (with the same topic name):
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \\n --attributes='{"push-endpoint": "http://localhost:10900", "persistent": "true"}'
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 s3 mb s3://fish
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration \\n --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "notif1", "TopicArn": "arn:aws:sns:default:world:fishtopic", "Events": []}]}'
- verify that the topics are listed seperatly per tenant:
bin/radosgw-admin topic list --tenant=boom
bin/radosgw-admin topic list --tenant=world
- upload file to bucket of 1st tenant:
make sure that the topic endpoint is down, so the queue is not emptied
AWS_ACCESS_KEY_ID=hello AWS_SECRET_ACCESS_KEY=world aws --endpoint-url http://localhost:8000 s3 cp myfile s3://fish
- check stats of topics of both tenats:
bin/radosgw-admin topic stats --tenant=world --topic fishtopic
bin/radosgw-admin topic stats --tenant=boom --topic fishtopic
- expected behavior: 1st call shows one entry and 2nd call shows zero entries
- actual behavior: 1st call shows one entry and 2nd call shows one entry