-
Notifications
You must be signed in to change notification settings - Fork 80
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
NC | NSFS | Bucket Logging After Delete Bucket #8540
Comments
Hi,
we don't have the config file anymore, like trying to access to a bucket that don't exist. @aspandey @alphaprinz Note: 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. |
@shirady We can not do bucket logging if bucket does not exist..so in that case we should not even log this message if we do not want such logs. |
@aspandey the bucket exists and then the client send a request to delete it (operation is delete bucket). |
@shirady If I remember correctly, bucket logging was introduced to log bucket operation only, means, get/put/delete objects on a bucket if it is configured to log. |
BucketLogging is set on a specific bucket, if the bucket is gone, then the logging config and the need to log.... no? |
@nimrod-becker, this is what I'm trying to understand - if we need the last log of the operation of |
I discussed with @aspandey and suggested the following minor changes:
If you have any comments regarding the code changes please write them in the PR #8527. regarding @romayalon's question above - as I understand there many changes, and it is something that needs to be checked. we can open an issue about this gap - related to bucket logging (not related to the Add stat to bucket_namespace_cache). |
1. Create config option NC_ENABLE_BUCKET_NS_CACHE_STAT_VALIDATION to enable/disable this addition. 2. Add in read_bucket_sdk_info inside bucketspace FS property stat, and add a method stat_bucket that would only implemented in FS (as we stat cofig files, and in NB with DB we don't need this). 3. Edit the _validate_bucket_namespace so before checking the validation by time, in case it is bucketspace FS we will compare the stat and return false (invalidate) in case the config file was changed. 4. Changes in nc_coretest create the functions start_nsfs_process and stop_nsfs_process based on existing implementation to allow us to restart nsfs. 5. Rename the function check_bucket_config to check_stat_bucket_storage_path that it would be less confusing. 6. Edit the printings of "Could not log bucket operation" to have the details of where they were printed. 7. Adding a basic test of running with a couple of forks. 8. Change the default number of forks in the Ceph NSFS tests in the CI to 2. 9. Rename file test_bucketspace.js to test_nsfs_integration.js and the nc_core test log files from src/logfile to nsfs_integration_test_log. 10. Small changes in s3_bucket_logging.js regarding bucket deletion: bucket existed and bucket that did not exist - see NC | NSFS | Bucket Logging After Delete Bucket noobaa#8540. Signed-off-by: shirady <[email protected]>
I'm closing the issue since we added the changes in file |
Environment info
stat
tobucket_namespace_cache
#8527Actual 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
The text was updated successfully, but these errors were encountered: