Commit Graph

2983 Commits

Author SHA1 Message Date
A.J. Beamon 9260367cac Remove a few things and some other small cleanup. 2022-06-23 15:39:53 -07:00
A.J. Beamon 9f3819752f Change the command to create a metacluster from using 'configure tenant_mode=management' to 'metacluster create <NAME>'. Distribute this name to all processes in a metacluster. Eliminate the tenant mode entirely from metacluster clusters, instead relying on a metacluster registration key. 2022-06-22 12:15:43 -07:00
A.J. Beamon 739fc9ce6b Merge branch 'main' into feature-metacluster 2022-06-09 12:39:34 -07:00
Robert Barabas 8606923da2
Arm64 related build fixes (#7319)
* Add missing include

* Fix open call on arm64

* Bump up doctest to 2.4.8
2022-06-08 11:20:27 -07:00
Markus Pilman d141347500
Merge pull request #7282 from Doxense/fix-windows-tests
Fix windows tests
2022-06-08 08:18:47 -06:00
Yi Wu bbf8cb4b02
GetEncryptCipherKeys helper function and misc encryption changes (#7252)
Adding GetEncryptCipherKeys and GetLatestCipherKeys helper actors, which encapsulate cipher key fetch logic: getting cipher keys from local BlobCipherKeyCache, and on cache miss fetch from EKP (encrypt key proxy). These helper actors also handles the case if EKP get shutdown in the middle, they listen on ServerDBInfo to wait for new EKP start and send new request there instead.

The PR also have other misc changes:
* EKP is by default started in simulation regardless of. ENABLE_ENCRYPTION knob, so that in restart tests, if ENABLE_ENCRYPTION is switch from on to off after restart, encrypted data will still be able to be read.
* API tweaks for BlobCipher
* Adding a ENABLE_TLOG_ENCRYPTION knob which will be used in later PRs. The knob should normally be consistent with ENABLE_ENCRYPTION knob, but could be used to disable TLog encryption alone.

This PR is split out from #6942.
2022-06-07 21:00:13 -07:00
A.J. Beamon ce1bd5f974 Merge branch 'multiple-tenant-creation' into feature-metacluster
# Conflicts:
#	fdbclient/GenericManagementAPI.actor.h
#	fdbclient/SpecialKeySpace.actor.cpp
#	fdbserver/tester.actor.cpp
#	fdbserver/workloads/FuzzApiCorrectness.actor.cpp
#	fdbserver/workloads/TenantManagement.actor.cpp
2022-06-06 15:04:10 -07:00
Hao Fu e7fa8e9f6f
Add versionstamp support in tuple (#7293)
Tuple in C++ needs to support Versionstamp.
2022-06-02 17:44:10 -07:00
A.J. Beamon 2907aafa60 Merge branch 'main' into feature-metacluster 2022-06-02 12:18:42 -07:00
Ata E Husain Bohra b66509eff0
Make EncryptKeyServer and KmsConnector API to be 'tenant' name aware (#7215)
Description

Major changes proposed include:
1. Update EncryptKeyServer APIs to be tenant aware.
2. Update KmsConnector APIs to be tenant aware

Client of above APIs such as: CP, SS and BlobWorker need to supply
encryption domain info that includes: tenantId and tenantName

Testing

1. Update EncryptKeyProxyTest
2. Update RESTKmsConnectorTest
3. Update SimKmsConnectorTest
2022-06-02 11:55:50 -07:00
Junhyun Shim 3e79735b2f
Authz JWT support (#7279)
* Add JWT support to TokenSign

* Encapsulate OpenSSL public/private key type

Type-safe passing around of keys without having to DER/PEM-serialize
(OpenSSL doesn't have distinct types for public and private key)

* Apply Clang format

* Add verify benchmark for JWT and FlatBuffers token

* Unit test base64url::{encode, decode}

* Make all payload fields optional

Let user code validate non-signature fields

* Make all payload fields optional

Completely defer field check to user code

* Move rapidjson from fdbclient to contrib

* Make fdbrpc's rapidjson linkage private

Currently only sources include them.

* Modify rapidjson path in apiversioner.py

* Algorithm::Unknown > Algorithm::UNKNOWN
2022-06-02 13:22:50 +02:00
A.J. Beamon 38b90910d6 Start some work toward simulating a metacluster. Fix a few bugs found by the initial tests. 2022-06-01 15:56:59 -07:00
Mohamed Oulmahdi 26ad8bc184 Format 2022-05-31 14:17:41 +02:00
Vaidas Gasiunas 4d6ec7663f Close file at the end of runNetwork rather than in stopNetwork in order to avoid a race condition,
also in order to continue tracing the pending network thread activity.
Poll event throttler only in the network thread in order to avoid a race condition.
2022-05-31 13:59:09 +02:00
Mohamed Oulmahdi 81e81c6799 Fix atomicPath and abspath for Windows 2022-05-31 12:01:39 +02:00
Mohamed Oulmahdi 541ff206f3 Use \n instead of \r\n in log formatters 2022-05-31 11:59:21 +02:00
Xiaoxi Wang 5bea02cfde
Merge pull request #6686 from sfc-gh-xwang/readaware
Read-aware Data Distributor (default disabled)
2022-05-26 11:05:03 -07:00
Renxuan Wang cd2a575e02
Move the resolve of coordinator hostname from getCoordinatorProtocol() to getClusterProtocolImpl(). (#7245)
* Move the resolve of coordinator hostname from getCoordinatorProtocol() to getClusterProtocolImpl().

* Guard DNS Cache behind a knob.
2022-05-26 09:45:54 -07:00
Xiaoxi Wang 5816890dfc Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-05-25 14:48:28 -07:00
A.J. Beamon 9773261a03 Expand support for tenant groups. Track where each tenant group is assigned and used groups to help assign tenants. Fix tenant state tracking bugs. Add help hints for metacluster remove FORCE. 2022-05-24 11:58:40 -07:00
Xiaoxi Wang 4cbec5c742
Merge branch 'apple:main' into features/debug-macro 2022-05-24 09:12:39 -07:00
Xiaoxi Wang fd35fde481 Merge branch 'main' of https://github.com/apple/foundationdb into readaware 2022-05-23 15:09:03 -07:00
Xiaoxi Wang bda65b95ad update header 2022-05-23 14:50:45 -07:00
Renxuan Wang df4e0deb4d
coordinatorsKey should not always store IP addresses. (#7204)
* coordinatorsKey should not storing IP addresses.

Currently, when we do a commit of coordinator change, we are always converting hostnames to IP addresses and store the converted results in coordinatorsKey (\xff/coordinators). This result in ForwardRequest also sending IP addresses, and receivers will update their cluster files with IPs, then we lose the dynamic IP feature.

* Remove the legacy coordinators() function.

* Update async_resolve().

ip::basic_resolver::async_resolve(const query & q, ResolveHandler && handler) is deprecated.

* Clean code format.

* Fix typo.

* Remove SpecifiedQuorumChange and NoQuorumChange.
2022-05-23 11:42:56 -07:00
Xiaoxi Wang 73624bcd2a Merge remote-tracking branch 'upstream/main' into readaware 2022-05-23 11:17:38 -07:00
Junhyun Shim 02b2f97e99
mTLS test helpers (#7218)
* Add TLS option to (local_cluster|tmp_cluster).py

* Add TLS-enabled C API test
2022-05-23 12:47:51 +02:00
A.J. Beamon d784173f7f Add first implementation of tenant creation and deletion in a metacluster 2022-05-20 15:21:21 -07:00
Xiaoxi Wang 5a431980d2 Merge branch 'main' of https://github.com/apple/foundationdb into features/debug-macro 2022-05-20 12:18:20 -07:00
Xiaoxi Wang 6b996dca29 add debug macro 2022-05-20 12:17:45 -07:00
Ray Jenkins d1efc05a9b
Remove parentContext.traceID from MessagePack serialization. (#7197)
The OTEL receiver does not utilize the parent Trace id, only parent Span id. Essentially
it relies on Trace ids implicitly matching during trace assembly. Therefore, we may remove
these 16 bytes in serialization.
2022-05-19 16:43:06 -05:00
He Liu bc509d9572 Added fetchCheckpointKeyValuesQ in storage server. 2022-05-19 13:27:21 -07:00
A.J. Beamon 69261f9f10 Merge branch 'main' into feature-metacluster
# Conflicts:
#	fdbclient/MultiVersionTransaction.actor.cpp
#	fdbclient/MultiVersionTransaction.h
#	fdbserver/tester.actor.cpp
2022-05-19 09:11:30 -07:00
Xiaoxi Wang 6c11fc74ba add debug traces 2022-05-18 15:20:23 -07:00
Xiaoxi Wang 382f0fc4a2 merge upstream/main 2022-05-17 10:20:51 -07:00
Xiaoxi Wang 3b241955e7 add more informative trace info 2022-05-16 21:25:56 -07:00
Xiaoxi Wang 8e2a78bf3c
Merge pull request #7087 from sfc-gh-xwang/features/read-skew
Add SkewedReadWriteWorkload
2022-05-16 16:13:57 -07:00
Junhyun Shim 3fe23ce666 Merge remote-tracking branch 'origin/main' into mtls-test-helpers 2022-05-16 13:19:45 +02:00
Junhyun Shim 5308a2727f Fix failing Mac build from boringssl
X509V3_EXT_conf_nid is part of 'libdecrepit' in BoringSSL.
Use X509V3_EXT_nconf_nid instead.
2022-05-16 11:58:42 +02:00
Xiaoxi Wang b0c26e93b2 remove size() method 2022-05-13 12:55:19 -07:00
Xiaoxi Wang e59bdbf3a3 merge upstream/main 2022-05-13 12:22:09 -07:00
Xiaoxi Wang 78f819fb2a
Update flow/serialize.h
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2022-05-13 11:36:03 -07:00
Vaidas Gasiunas 85092ab53c
Merge pull request #7148 from sfc-gh-jshim/mtls-test-helpers
Unit test MkCert
2022-05-13 15:39:46 +02:00
Andrew Noyes a92ef37d44 Log a backtrace before throwing serialization_failed 2022-05-12 20:08:36 -07:00
Junhyun Shim cd4a7038fc Move CertKind::getCommonName() to source file 2022-05-12 23:14:52 +02:00
Junhyun Shim 809bc52bbc Add boringssl workaround for Mac builds 2022-05-12 23:12:51 +02:00
Junhyun Shim 8117aa9670 Add Selective mTLS unit test using MkCert 2022-05-12 21:29:20 +02:00
Renxuan Wang 30e124c09b Remove HostnameStatus and resolve trigger.
They are no longer needed since we have coordinators DNS cache; and they are introducing complex crashes.
2022-05-12 10:13:55 -07:00
Junhyun Shim 0dbbadfd77
Merge pull request #7088 from sfc-gh-jshim/mtls-test-helpers
mTLS test helpers
2022-05-12 14:35:23 +02:00
A.J. Beamon 85019612d4 Remove subordinate mode and instead use a key in the system key-space to track metacluster membership. Use this key to determine if a cluster is already part of a metacluster or can be configured away from required mode. Disallow configuring to or from a management cluster that has data. 2022-05-11 17:10:55 -07:00
Ata E Husain Bohra a7cd61c5cf
Enable debugId tracing for encryption requests (#7111)
* Enable debugId tracing for encryption requests

Description

   diff-1: Minor fixes, address review comment

Proposed changes include:
1. Update EncryptKeyProxy API to embded Optional<UID> for debugging
   request execution.
2. Encryption participant FDB processes can set 'debugId' enabling
   tracing requests within FDB cluster processes and beyond.
3. The 'debugId' if available is embedded as part of 'request_json_payload'
   by RESTKmsConnector, enabling tracing request between FDB <--> KMS.
4. Fix EncryptKeyProxyTest which got broken due to recent changes.

Testing

Updated following test:
1. EncryptKeyProxy simulation test.
2. RESTKmsConnector simulation test.

Description

Testing
2022-05-11 13:23:27 -07:00