-
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
NSFS | Regular object key & dir content object - key/ co-existence and overriding #8320
Comments
@romayalon Great that you reported that issue - I was also about to report this when I had to change Ceph s3-tests |
Yes, as part of my research for the versioning tests I ran the complete https://github.com/ceph/s3-tests against NC and inspected the results. This is where I came across the above issue. |
@nadavMiz I remember vaguely that we didn't support directory object and versioning together, can you please check that? |
@naveenpaul1 will take the overriding issues |
Environment info
key and key/ co-existence -
Actual behavior
In general - On AWS key and key/ are 2 different objects, we can have both simultaneously while in NooBaa we didn't handle this edge case due to file system limitation, when trying to create obj1 and obj1/ directly on the FS we will get the following error -
Expected behavior
If we do want to support it, it'll require a special design.
Key and Key/ overriding bugs -
Actual behavior
There are 2 faulty scenarios that were found, related to overriding of key and key/ -
Steps to reproduce -
sudo node src/cmd/nsfs --debug=5
sudo node src/cmd/manage_nsfs.js account add --name account1 --user root --new_buckets_path=/private/tmp/dir1/ --debug 5
sudo node src/cmd/manage_nsfs.js bucket add --name bucket1 --owner account1 --path /private/tmp/dir1/
alias s3api='AWS_ACCESS_KEY_ID=<access_key> AWS_SECRET_ACCESS_KEY=<secret_key> aws --endpoint-url=https://localhost:6443 --no-verify-ssl s3api'
s3api put-object --bucket=bucket1 --key=obj1.txt --body=obj1.txt
s3api put-object --bucket=bucket1 --key=obj1.txt/ --body=obj1.txt
[Error: Not a directory] { code: 'ENOTDIR', context: 'Rename _old_path=/private/tmp/dir2/.noobaa-nsfs_66d04430da7de6f67dc274ec/uploads/9b718dce-05b7-49a8-ad06-73cafbf78ad9 _new_path=/private/tmp/dir2/obj1.txt/.folder ' }
s3api put-object --bucket=bucket1 --key=obj2.txt/ --body=obj2.txt
s3api put-object --bucket=bucket1 --key=obj2.txt --body=obj2.txt
[Error: Is a directory] { code: 'EISDIR', context: 'Rename _old_path=/private/tmp/dir1/.noobaa-nsfs_66d04430da7de6f67dc274ec/uploads/0aafbda8-6ad0-40d3-815f-24abddacacb1 _new_path=/private/tmp/dir1/obj2.txt ' }
Expected behavior
The text was updated successfully, but these errors were encountered: