Open shirady opened 3 hours ago
Hi, The main question is to understand what should happen when a bucket is deleted - Should we create the bucket logging? should we have the bucket notifications?
https://github.com/noobaa/noobaa-core/blob/f924d96bc87993ca2d1615bfd69da460bb186093/src/endpoint/s3/s3_bucket_logging.js#L22 we don't have the config file anymore, like trying to access to a bucket that don't exist.
@aspandey @alphaprinz cc: @romayalon @jackyalbo
Note: In case I can add 'delete_bucket' to outer if it is a simple solution and I can do it in my PR.
if (req.params && req.params.bucket &&
!(req.op_name === 'put_bucket' ||
+ req.op_name === 'bucket_delete' ||
req.op_name === 'put_bucket_notification' ||
req.op_name === 'get_bucket_notification'
)) {
But I must understand what you think, and better to have the GAP open than to create a wrong flow.
Regarding notifications, deleting a bucket is not an event that triggers a notification. (You can see the list of events here). So your suggested fix is ok for notifications.
Environment info
Actual behavior
send_bucket_op_logs
on delete bucket operation, we would not have thebucket_info
anymore in the cache; therefore we would see the printing of "Could not log bucket operation".Expected behavior
Steps to reproduce
We can see it in the Ceph tests See this comment in the PR
More information - Screenshots / Logs / Other output
-