- have a running ceph cluster with an RGW (e.g. usign vstart):
MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
- create a persistent topic that points to an invalid endpoint:
aws --endpoint-url http://localhost:8000 sns create-topic --name=fishtopic \
--attributes='{"push-endpoint": "kafka://localhost:9999", "persistent": "true"}'
- create a bucket:
aws --endpoint-url http://localhost:8000 s3 mb s3://fish
- define a notification on the bucket:
aws --endpoint-url http://localhost:8000 s3api put-bucket-notification-configuration --bucket fish \
--notification-configuration='{"TopicConfigurations": [{"Id": "notif1", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": []}]}'
- upload objects to the bucket
- use the containerized
radosgw-admin
to dump the pending notifications from that topic:
podman run --mount type=bind,src=<vstart root dir>,dst=<vstart root dir> -it \
quay.io/ylifshit/radosgw-admin radosgw-admin -c <vstart root dir>/ceph.conf topic dump --topic fishtopic
note that in the above we mount the directory where all the files pointed by
ceph.conf
reside. in a non-vstart deployment other directories should be mounted
- the version of the
radosgw-admin
in the container was built off ofaquid
branch and tested withreef
andquincy
.
- get list of queue objects:
bin/rados -p default.rgw.log -N notif ls
- dump queue object to file:
bin/rados -p default.rgw.log -N notif get <queue object name> <output file name>
- use the below python script to parse the file:
python parse-notifications.py <output file name> | jq .