Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: noobaa/noobaa-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1d9f7deda9874d2b89413669fb5b634999440b4c
Choose a base ref
..
head repository: noobaa/noobaa-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b19d5ae1e5d14b6ef140a5a324dfb70a1b8a2a03
Choose a head ref
Showing with 2,113 additions and 1,248 deletions.
  1. +4 −1 config.js
  2. +1 −1 docs/NooBaaNonContainerized/S3Ops.md
  3. +45 −0 docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md
  4. +879 −871 package-lock.json
  5. +12 −12 package.json
  6. +4 −4 src/cmd/manage_nsfs.js
  7. +3 −0 src/endpoint/endpoint.js
  8. +5 −0 src/endpoint/endpoint_utils.js
  9. +5 −4 src/endpoint/s3/ops/s3_head_bucket.js
  10. +1 −0 src/endpoint/s3/s3_errors.js
  11. +28 −27 src/endpoint/s3/s3_rest.js
  12. +11 −1 src/endpoint/s3/s3_utils.js
  13. +47 −3 src/endpoint/sts/ops/sts_post_assume_role.js
  14. +1 −1 src/endpoint/sts/sts_rest.js
  15. +6 −6 src/manage_nsfs/health.js
  16. +35 −1 src/manage_nsfs/manage_nsfs_cli_errors.js
  17. +25 −1 src/manage_nsfs/manage_nsfs_cli_responses.js
  18. +2 −1 src/manage_nsfs/manage_nsfs_cli_utils.js
  19. +20 −13 src/manage_nsfs/manage_nsfs_constants.js
  20. +67 −1 src/manage_nsfs/manage_nsfs_help_utils.js
  21. +10 −6 src/manage_nsfs/manage_nsfs_validations.js
  22. +79 −0 src/manage_nsfs/upgrade.js
  23. +18 −1 src/sdk/bucketspace_fs.js
  24. +11 −1 src/sdk/config_fs.js
  25. +11 −5 src/sdk/namespace_blob.js
  26. +80 −99 src/sdk/namespace_fs.js
  27. +15 −5 src/sdk/namespace_s3.js
  28. +18 −15 src/sdk/object_sdk.js
  29. +2 −2 src/server/bg_services/replication_server.js
  30. +58 −1 src/test/system_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_black_list.txt
  31. +0 −72 src/test/system_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_pending_list.txt
  32. +29 −1 src/test/system_tests/test_utils.js
  33. +97 −0 src/test/unit_tests/jest_tests/test_cli_upgrade.test.js
  34. +72 −0 src/test/unit_tests/jest_tests/test_nsfs_concurrency.test.js
  35. +84 −0 src/test/unit_tests/jest_tests/test_versioning_concurrency.test.js
  36. +42 −15 src/test/unit_tests/test_bucket_replication.js
  37. +28 −10 src/test/unit_tests/test_bucketspace_versioning.js
  38. +21 −5 src/test/unit_tests/test_namespace_fs.js
  39. +46 −28 src/test/unit_tests/test_nc_nsfs_health.js
  40. +31 −0 src/test/unit_tests/test_nsfs_versioning_gpfs.js
  41. +51 −8 src/test/unit_tests/test_s3_ops.js
  42. +68 −18 src/test/unit_tests/test_sts.js
  43. +41 −8 src/util/native_fs_utils.js
5 changes: 4 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -764,7 +764,8 @@ config.NSFS_REMOVE_PARTS_ON_COMPLETE = true;
config.NSFS_BUF_POOL_WARNING_TIMEOUT = 2 * 60 * 1000;
config.NSFS_SEM_WARNING_TIMEOUT = 10 * 60 * 1000;
// number of rename retries in case of deleted destination directory
config.NSFS_RENAME_RETRIES = 3;
config.NSFS_RENAME_RETRIES = 10;
config.NSFS_MKDIR_PATH_RETRIES = 3;

config.NSFS_VERSIONING_ENABLED = true;
config.NSFS_UPDATE_ISSUES_REPORT_ENABLED = true;
@@ -904,6 +905,8 @@ config.QUOTA_MAX_OBJECTS = Number.MAX_SAFE_INTEGER;
//////////////////////////

config.STS_DEFAULT_SESSION_TOKEN_EXPIRY_MS = 60 * 60 * 1000; // 1 hour
config.STS_MIN_DURATION_SECONDS = 15 * 60; // 15 minutes
config.STS_MAX_DURATION_SECONDS = 12 * 60 * 60; // 12 hours

/////////////////////////
// BLOCK STORE FS //
2 changes: 1 addition & 1 deletion docs/NooBaaNonContainerized/S3Ops.md
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ Warning: this policy allows `<account-name>` to run all S3 operations.
##### Principal Field:
A bucket policy defines which principals can perform actions on the bucket. The Principal element specifies the user or account that is either allowed or denied access to a resource.
Currently we support a couple of options:
1. Grant anonymous permissions (all principals): either `"Principal": { "AWS": "*" }` or `"Principal": { "*" }`.
1. All principals (includes anonymous account): either `"Principal": { "AWS": "*" }` or `"Principal": "*"`.
2. Principal by account name: `"Principal": { "AWS": [ "<account-name-1>", "<account-name-2>", ... ,"<account-name-n>"] }`
3. Principal by account ID: `"Principal": { "AWS": [ "<account-ID-1>", "<account-ID-2>", ... ,"<account-ID-n>"] }`

45 changes: 45 additions & 0 deletions docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
4) Debug a Single Ceph S3 Test
5) Compare to AWS Response (Inside Tester Pod)
6) Examples
7) Run a Single Ceph S3 Test in NC deployment Manually
* This guide describes developer steps to run Ceph S3 on a Noobaa system on minikube.

## General Settings For Ceph S3 Tests
@@ -287,4 +288,48 @@ S3TEST_CONF=${PWD}/src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf

Notice that even though test commands succeeded the test itself was skipped. The test prints `1 skipped` meaning one test was skipped

## Run a Single Ceph S3 Test in NC deployment Manually

### NC local on your machine
#### Account creation
Create the needed accounts for the Ceph configurations, for example:
1. ceph (main account)
2. ceph_alt (an account that is used on tests when two different accounts are needed, this is the alternative account - for example I saw it used in one of the bucket policy tests)
3. ceph_tenant

In cases that you don't need additional account you can simply copy the main account access keys in the ceph configuration file.

To create the accounts in NC with access key and secret key that you chose is by running:
`sudo node src/cmd/manage_nsfs account add --name ceph --new_buckets_path <new-buckets-path> --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>`
(more information can be found in [NooBaa CLI](./../../NooBaaNonContainerized/NooBaaCLI.md))
for example:
`sudo node src/cmd/manage_nsfs account add --name ceph --new_buckets_path /private/tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid 1001 --gid 1001`.
Note: before creating the account need to give permission to the `new_buckets_path`, in this example: `mkdir -p /private/tmp/nsfs_root1; sudo chmod 777 /private/tmp/nsfs_root1`.

#### NSFS Server
Start the NSFS server with: `sudo node src/cmd/nsfs --debug 5`
Note: on every code change you would need to stop the server (ctrl + c) and run it again.

### Ceph S3 repository:
1) Clone the repository [ceph/s3-test](https://github.com/ceph/s3-tests):
`git clone https://github.com/ceph/s3-tests.git`

2) Edit the attached config, you can rename it and use this config only in the commands that you run, for example:
`cp s3tests.conf.SAMPLE test_nsfs_ceph_s3_config.conf`, inside the file change the following values `vi test_nsfs_ceph_s3_config.conf`:
- host = localhost
- port = 6443
- is_secure = True
- ssl_verify = False
- bucket prefix = your-name-{random}
- under "[s3 main]" under "main AWS access key" add the ceph account credentials
- under "[s3 alt]" under "alt AWS access key set in vstart.sh" add the ceph_alt credentials (if your tests do not need it you can copy the ceph credentials)
- under "[s3 tenant]" under "tenant AWS secret key set in vstart.sh" add 3. ceph_tenant credentials (if your tests do not need it you can copy the ceph credentials)
- user_id - it depends if your tests uses it and for what purpose, usually you can add the account id, I saw a case where it was for principal in bucket policy and there you can add the account name

3) Run a single test by running:
`S3TEST_CONF=<configuration-file> tox -- <test-full-name>`
for example:
`S3TEST_CONF=test_nsfs_ceph_s3_config.conf tox -- s3tests_boto3/functional/test_s3.py::test_versioning_multi_object_delete_with_marker_create`.
Make sure that you run it from the Ceph repo: `pwd` will be `<path-to-ceph-S3-repo>/s3-tests`.
Note: In case you need install boto3 and tox: `python3 -m pip install boto3` and `python3 -m pip install tox`

Loading