Skip to content
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_namespace_cache Is Not Updated Between Forks #8391

Open
shirady opened this issue Sep 22, 2024 · 0 comments
Open

NC | NSFS | bucket_namespace_cache Is Not Updated Between Forks #8391

shirady opened this issue Sep 22, 2024 · 0 comments
Labels

Comments

@shirady
Copy link
Contributor

shirady commented Sep 22, 2024

Environment info

  • NooBaa Version: 5.18
  • Platform: NC

Actual behavior

  1. When using child process configuration (ENDPOINT_FORKS in the config.json) the bucket_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

  1. The cache will be updated and we will not have to wait.

Steps to reproduce

This issue was raised as part of issue #8368

  1. Change the configuration to have more than 1 fork, for example: sudo vi /etc/noobaa.conf.d/config.json and {"ENDPOINT_FORKS": 2}).
  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).
  3. 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>" ] 
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant