noobaa-core
noobaa-core copied to clipboard
NC | NSFS | `bucket_namespace_cache` Is Not Updated Between Forks
Environment info
- NooBaa Version: 5.18
- Platform: NC
Actual behavior
- When using child process configuration (
ENDPOINT_FORKS
in theconfig.json
) thebucket_namespace_cache
is not shared between the forks. Currently, we need to wait for one minute before the item is cleaned from the cache.
Expected behavior
- The cache will be updated and we will not have to wait.
Steps to reproduce
This issue was raised as part of issue #8368
- Change the configuration to have more than 1 fork, for example:
sudo vi /etc/noobaa.conf.d/config.json
and{"ENDPOINT_FORKS": 2}
). - Change the bucket configuration (for example change the existing bucket policy from: list object versions of a versioned bucket of all principals on the bucket and its objects to: allow get-object of a specific key with principal of account2).
- Use the configuration as it was changed (try to get-object of this key by account2).
more details about the steps can be found in this comment. It is not guaranteed that you will reproduce it since it might be that all the changes would be from the same child process.
More information - Screenshots / Logs / Other output
Example of policies: from policy1:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "*" },
"Action": [ "s3:ListBucketVersions" ],
"Resource": [ "arn:aws:s3:::<bucket-name>/*", "arn:aws:s3:::<bucket-name>" ]
}
]
}
to policy2:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "AWS": [ "<account name-2" ] },
"Action": [ "s3:GetObject", "s3:GetObjectVersion" ],
"Resource": [ "arn:aws:s3:::<bucket-name>/<key-name>" ]
}
]
}