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

NSFS | Versioning | Suspended Mode Delete Object #7369

Merged
merged 1 commit into from
Jul 16, 2023

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Jul 2, 2023

Explain the changes

  1. Add NSFS Versioning Suspended mode to support delete-object operation.
  2. Minor changes in comments and formatting in code lines related to NSFS | Versioning | Suspended Mode Put Object.
     

Issues: Gaps

  1. In suspended mode changes we used only "safe" filesystem functions (safe_move, safe_unlink), later we might change it according to the specific case (we also don't have concurrency tests).
  2. GPFS was not tested yet with these changes.
  3. We currently don't keep XATTR_PREV_VERSION_ID updated in case there is a deletion of a specific version id or in case we delete an old null version from the .versions/ directory.
  4. When we have a delete-object request we don't validate that it was requested from the bucket owner.
     

Testing Instructions:

Manual Tests:

  1. Change the configuration of NSFS Versioning to be Enabled in file config.js and change config.NSFS_VERSIONING_ENABLED to true.
  2. Deploy noobaa system on minikube (Based on the instructions here - the steps of ‘Build images’ and ‘Deploy noobaa’).
    Note: nb is an alias that runs the local operator from build/_output/bin (alias created by devenv).
  3. Deploy NSFS on minikube (Based on the instructions here).
  4. Use AWS CLI and use the put-object command (here is a link to their doc).
  5. Set the bucket to versioning Enabled and put-object of another key (here is a link to their doc).
  6. Set versioning to suspended and put versions of the same object that were uploaded before (steps 4 and 5).
  7. Use AWS CLI and use the delete-object command (here is a link to their doc).
     
    While you add and delete objects to the bucket you can view the changes
  8. Connect to the endpoint pod: kubectl exec -it [endpont-pod-name] -- bash.
  9. Move to the bucket path (if you did it as written in the wiki it would be cd /nsfs/fs1/bucket-path/).
  10. Use Linux commands to list the files (including hidden files), for example: ls -al.
     

Run Unit Tests:

  1. In file src/test/unit_tests/sudo_index.js leave only require('./test_bucketspace_versioning'); (rest of test files  comment out).
  2. From the core tab in the terminal run: make root-perm-test (You should see "140 passing" at the end of the output).
     
  • Tests added: NSFS Versioning Suspended mode: delete-object (latest),  delete-object version-ID, and delete-objects (based on existing tests that we have in NSFS Versioning Enabled mode).

@shirady shirady self-assigned this Jul 2, 2023
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
@shirady shirady force-pushed the delete-object-nsfs-versioning branch 2 times, most recently from 2d70268 to 2c1e30f Compare July 13, 2023 09:24
@shirady shirady requested a review from romayalon July 13, 2023 10:45
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
@shirady shirady force-pushed the delete-object-nsfs-versioning branch from 2c1e30f to 450abca Compare July 16, 2023 05:26
@shirady shirady merged commit 6a2879f into noobaa:master Jul 16, 2023
7 checks passed
@shirady shirady deleted the delete-object-nsfs-versioning branch July 16, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants