Commit Graph

1297 Commits

Author SHA1 Message Date
A.J. Beamon a261c1d94c Run tenant management concurrency alongside metacluster management concurrency. Fix a few issues where performing tenant operations returned undesirable errors when the associated cluster was removed. 2023-02-11 19:46:47 -08:00
A.J. Beamon e6021f8326 Add Jon's metacluster concurrency test and fix various bugs that it found 2023-02-11 15:15:32 -08:00
A.J. Beamon 6a2f63029e
Merge pull request #9354 from sfc-gh-ajbeamon/disable-tenants-in-downgrade-tests
Disable tenants in downgrade tests to versions before 7.3
2023-02-11 12:11:46 -08:00
A.J. Beamon ee1b48323d
Merge pull request #9346 from sfc-gh-nwijetunga/nim/global-tenant-ids
Support for Two Byte Prefix for Tenant IDs
2023-02-11 11:31:24 -08:00
A.J. Beamon 69fd1addec Disable tenants in downgrade tests to versions before 7.3. For some tests, use an alternate method to disable tenants. 2023-02-11 09:58:29 -08:00
Nim Wijetunga de9eef72ff address pr comments 2023-02-10 13:49:15 -08:00
Ata E Husain Bohra f30c5a13ac
EaR: Configurable Encryption feature support for BlobGranules (#9343)
Description

Patch update BlobGranule encryption code to support Configurable
encryption semantics

Testing

BlobGranuleCorrectness* - 100K
2023-02-09 21:13:56 -08:00
Josh Slocum 81c984e48a
adding encryption at rest support to local cluster and api tester (#9325)
* adding encryption at rest support to local cluster and api tester

* adding encrypted variant of bg tenant test and renaming ear
2023-02-09 10:23:17 -06:00
Ata E Husain Bohra 9c649d7880
EaR: Configurable encryption framework (#9271)
* EaR: Configurable encryption framework

Description

EaR implementation only supports fixed size on-disk encryption header format.
One drawback of the scheme is, introducing a newer encryption scheme as well
as updating header format in future may incur data migration restrictions.
Major changes proposed in the patch includes:
1. Flexible Encryption header format allowing the following:
 1.1. Header flags (metadata) can evolve separately from the encryption algorithm
 1.2. Specific encryption algorithm header to allow future extensions.
2. Update the BlobCipher encryption/decryption util classes to work with newer
encryption header format.
3. Continue supporting multiple encryption authentication schemes such as:
HMAC-SHA and AES-CMAC; also, supports no encryption-authentication schemes.
4. Refactor BlobCipher unit test to enable testing of new format.
5. Configuration knobs to control encryption header flags and algorithm
versions.

Note: 
The on-disk header storage footprint savings due to the newer scheme is as follows:
1. No encryption authentication: 54% smaller compared to existing implementation.
3. AES-CMAC: 16% smaller compared to existing implementation.
3. HMAC-SHA encryption authentication: almost same size.


Testing

BlobCipherTest
EncryptionOpsTest
2023-02-08 22:51:05 -08:00
Junhyun Shim d7d0b658a3
Merge pull request #9314 from sfc-gh-jshim/authz-tenant-name-to-tenant-id
Make Authz use tenant ids instead of tenant names
2023-02-08 20:13:29 +01:00
Josh Slocum ebbd221fe7
formatting files (#9322)
* formatting files

* another file
2023-02-08 13:01:24 -06:00
Junhyun Shim d32d3dd085 Make token option NOT survive transaction hard resets 2023-02-08 18:12:22 +01:00
Josh Slocum e6c7927619
improving bg restart with higher workload and chaos for cycle, and new large restart workload (#9313) 2023-02-07 07:47:53 -06:00
Junhyun Shim ff61e2990b Fix clang build error and relax authz test tx timeout 2023-02-07 09:59:39 +01:00
Junhyun Shim be225acd2a Merge remote-tracking branch 'origin/main' into authz-tenant-name-to-tenant-id 2023-02-06 23:13:43 +01:00
Junhyun Shim 0d85425964 Add cross-tenant raw access testcase 2023-02-06 22:48:07 +01:00
Josh Slocum 0a19db8ce9
Blob granule restarting tests (#9259)
* Adding BlobGranuleRestartCycle tests

* test harness fix to not copy blob symlinks for restarting test
2023-02-06 14:54:20 -06:00
Junhyun Shim 1afd63d7e3 Minimize the risk of TracedTooManyLines in simulation
- Disable audit logging for simulation
- Relax the max_trace_lines knob limit to reduce false positives
2023-02-06 21:50:39 +01:00
Junhyun Shim 0d1801ed88 Expose private endpoints used in MVC mode and make MVT token sticky 2023-02-06 17:23:26 +01:00
Junhyun Shim 6993e391f2 Extend authz test to include with/without GRV caching and forced MVC 2023-02-06 13:18:10 +01:00
Yi Wu 680c9d49dc Fix malform from_7.0.0/UpgradeAndBackupRestore test spec 2023-02-05 19:57:59 -08:00
Junhyun Shim ce652fa284 Replace AuthZ's use of tenant names in token with tenant ID
Also, to minimize audit log loss, handle token usage audit logging at each usage.
This has a side-effect of making the token use log less bursty.
This also subtly changes the dedup cache policy.
Dedup time window used to be 5 seconds (default) since the start of batch-logging.
Now it's 5 seconds from the first usage since the closing of the previous dedup window
2023-02-03 21:46:31 +01:00
Xiaoxi Wang 53ce648325 set clearAfterTest=false in RawTenantAccessClean test 2023-02-02 13:26:56 -08:00
Nim Wijetunga 86f3665514
Handle EKP Tenant Not Found Errors (#9261)
handle EKP tenant not found errors
2023-02-01 19:15:38 -08:00
Xiaoxi Wang de670b7129
Merge pull request #9285 from sfc-gh-xwang/fix/main/testTimeout
Remove test timeout
2023-02-01 12:00:23 -08:00
Xiaoxi Wang 8f7a98fb9d remove test timeout 2023-02-01 11:04:39 -08:00
Jingyu Zhou fcab17cfab Merge remote-tracking branch 'apple/main' into fix 2023-01-31 12:47:28 -08:00
Xiaoxi Wang d1d860a342 merge upstream/main 2023-01-27 12:15:04 -08:00
Josh Slocum f91aa35f70
disabling low-value unit tests (#9251)
* disabling low-value unit tests

* re-enable ConfigDBUnitTest but run it less frequently
2023-01-27 10:59:26 -08:00
Nim Wijetunga 05a8a90830
Snapshot Backup Tenant Deletion Support (#9145)
Tenant deletion support for snapshot backups
2023-01-26 17:46:14 -08:00
Jingyu Zhou 4641c9b2a7 Merge remote-tracking branch 'apple/main' into fix 2023-01-26 13:53:33 -08:00
Yanqin Jin d461dbdd7b
Extend `metacluster status` on non-management clusters (#9179)
The metacluster status command in fdbcli currently reports some useful metacluster information when run on a
management cluster. We should update this command to report a status even on data clusters of a metacluster and
standalone clusters that do not belong to any metacluster.

- On data clusters, this would report that the cluster is a data cluster as well its name and the name of the metacluster it is a part of.
- On standalone clusters, status should report that the cluster is not part of a metacluster.

Test plan:
- CI
- Manual test
- Added new test `metacluster_fdbcli_tests.py` that can be run with ctest `ctest -R metacluster_fdbcli_tests`
2023-01-26 13:04:22 -08:00
Yi Wu 4d60328e76
Update restart test for encryption, Redwood and snapshot (#9214)
Changes:
1. Update `ConfigureDatabase` workload to test with Redwood, while previously it does not. Also when encryption is enabled, only test with Redwood and not test the migration to other storage engine types, as currently only Redwood supports encryption.
2. Update multiple restart tests so that when testing upgrade from/downgrade to 7.2, disable encryption. This is due to recent change to make encryption controlled by DB config instead of a knob make 7.3 encryption incompatible with 7.2 encryption, and 7.2 encryption is considered an incomplete feature. This is done by splitting `from_7.1.0` test directory into `from_7.1.0_until_7.2.0`/`from_7.2.0_until_7.3.0`/`from_7.3.0`, duplicating every test to these directories and add `disableEncryption=true` when needed. Except...
3. For tests that run `SnapTest`, keep them in `from_7.1.0_until_7.2.0` directory. These tests could fail with 7.2/7.3 restart test, and due to separate Joshua issue, these failures are not exposed when they stay in `from_7.1.0` directory. The plan is to only keep these snapshot tests in `from_7.3.0` (or the directory for restart from the latest version) once issues are fixed.
2023-01-26 12:34:41 -08:00
Jingyu Zhou afcca4a1ee Add from_7.0.0_until_7.2.0 for UpgradeAndBackupRestore tests 2023-01-25 18:01:47 -08:00
Jingyu Zhou 280eedeb9f Change UpgradeAndBackupRestore to from_7.2.4
Because of the new option "disabledFailureInjectionWorkloads" is not available
until 7.2.4.
2023-01-25 17:59:03 -08:00
Jingyu Zhou d10ea094f4 Add a new toml option to disable failure injection workload
This is needed for UpgradeAndBackupRestore-1 to make sure the DB is recoverable
so that the part 2 can start.
2023-01-25 17:58:46 -08:00
Jingyu Zhou 289f024481 Change SubmitBackup to only reboot in Attrition
Otherwise, the Attrition can RebootAndDelete tlogs in remote DC such that the
remote is unusable and blocking recovery to fully_recovered state. In fact,
the FirstCycleTest can only reach the accepting_commits state.

In the part 2 of the restarting test, the runTests() wait for quietDatabase()
to reach fully fully_recovered state, but was stuck in the accepting_commits
state.
2023-01-25 17:56:10 -08:00
Xiaoxi Wang 33bddb31c7 parse tenant id during getResolution phase 2023-01-25 09:49:04 -08:00
Andrew Noyes 218cda3cf6
Lower ASAN memory usage (#9216)
* Print an asan heap profile on OOM

* Use 32KiB stacks for boost coro

* Print 100%, 10 max contexts for asan OOM

* Lower machineCount to 30 in DataLossRecovery test

* Add asanMachineCount override to control ASAN memory usage
2023-01-24 13:04:47 -08:00
Xiaoxi Wang 014ebd3f01 update RawTenantAccessWorkload tenant map check 2023-01-23 13:24:54 -08:00
Jingyu Zhou 1876addaae
Merge pull request #9203 from sfc-gh-jshim/fix-actor-fuzz-timeout
Remove database involvement from ActorFuzz test
2023-01-23 09:24:12 -08:00
Junhyun Shim a6157a968b Remove database involvement from ActorFuzz test 2023-01-22 00:36:13 +01:00
A.J. Beamon b10d1f227b Remove tenant name from the TenantInfo object 2023-01-20 14:04:43 -08:00
Xiaoxi Wang 5a8cac6cf6 merge upstream/main; resolve merge change 2023-01-18 19:47:52 -07:00
Nim Wijetunga 330ac71630
Tenant Deletion Support for Backup Mutation Log (#9103)
tenant deletion support for backup mutation log
2023-01-18 15:11:58 -08:00
Xiaoxi Wang 853cafcb4c check mutation in applyMetadataEffect; modify RawTenantAccess test spec 2023-01-18 11:21:03 -07:00
Hui Liu 8d8cba5745 Add correct test for blob restore with large workload 2023-01-18 09:27:48 -08:00
Xiaoxi Wang 31c4cf8de2 add TenantRawAccess test 2023-01-17 16:16:58 -07:00
He Liu 00203c8732
Validate Storage part II (#8471)
* Implemented AuditUtils.actor.cpp

Moved AuditUtils to fdbserver/

* Persist AuditStorageState.

* Passed persisted AuditStorageState test.

* Added audit_storage_error to indicate a corruption is caught.

Throw/Send audit_storage_error when there is a data corruption.

Added doAuditStorage() for resuming Audit.

* Load and resume AuditStorage when DD restarts.

* Generate audit id monotonically.

* Fixed minor issue AuditId/Type was not set.

* Adding getLatestAuditStates.

* Improved persisted errors and added AuditStorageCommand.actor.cpp for
fdbcli.

* Added `audit_storage` fdbcli command.

* fmt.

* Fixed null shared_ptr issue.

* Improve audit data.

* Change DDAuditFailed to SevWarn.

* Sev.

* set SERVE_AUDIT_STORAGE_PARALLELISM to 1.

* Moved AuditUtils* to fdbclient/.

* Added getAuditStatus fdbcli command.

* Refactor audit storage fdb cli commands.

* Added auditStorage in sim.

* Cleanup.

* Resolved comments.

* Resolved comments.

* Test disabling audit for sims.

* Cleanup.

Co-authored-by: He Liu <heliu@apple.com>
2023-01-15 21:46:14 -08:00
Xiaoxi Wang 07b37245dd merge upstream/main; solve merge conflicts 2023-01-12 12:29:03 -08:00