349 Commits

Author SHA1 Message Date
Alex Miller
94b4f78ea9 Fix clients crashing in TLS code on exit.
If client code initiates an FDB operation to a TLS cluster, and then
immediately exits the main thread, then OpenSSL's atexit handler would
potentially run while the network thread is attempting to do TLS
operations, and thus crash.

This commit removes the OpenSSL atexit hander, and instead relies on a
client intentionally ending the network thread to do TLS cleanup.  If
the client code exits without stopping the network thread, then we'll
never free OpenSSL data structures, which is the safer thing to do.
2020-04-18 15:48:02 -07:00
A.J. Beamon
197f866824 Don't include internal tools such as fdbcli, backup, and DR in the status client list. 2020-03-23 14:44:04 -07:00
Evan Tschannen
ed4d02a3e4
Merge pull request #2812 from etschannen/feature-proxy-mem-limit
Limit the amount of requests the proxy can queue up in memory
2020-03-16 14:56:56 -07:00
Evan Tschannen
a068d4063f renamed ProxyGetConsistentReadVersion 2020-03-16 12:11:32 -07:00
A.J. Beamon
031b579ede Increase priority of the logging of various metrics trace events. 2020-03-13 16:20:23 -07:00
Evan Tschannen
243c268d9d Limit the amount of requests the proxy can queue up in memory 2020-03-13 10:17:49 -07:00
Evan Tschannen
dbfc0cbcc0
Merge pull request #2781 from alexmiller-apple/certificate-refresh
Refresh certificates used for handshaking when they change on disk
2020-03-06 11:12:04 -08:00
A.J. Beamon
fd8d569b91 Fix a few typos. 2020-03-05 14:42:07 -08:00
A.J. Beamon
6479034645 Add more metrics to the TransactionMetrics event 2020-03-05 14:00:44 -08:00
Alex Miller
595dd77ed1 Merge remote-tracking branch 'upstream/release-6.2' into certificate-refresh 2020-03-04 20:25:42 -08:00
Alex Miller
9b5ef3416e Refactor TLSParams into TLSConfig + LoadedTLSConfig
The idea being that we keep around a TLSConfig that the configuration
that the user has provided, and then when we want to intialize an SSL
context, we ask the TLSConfig to load all certificates and return us a
LoadedTLSConfig that is a concrete set of certificate bytes in memory.

initTLS now just takes the in-memory bytes and applies them to the ssl
context.

This is a large refactor to lead up into certificate refeshing, where we
will periodically check for changes to the certificates, and then
re-load them and apply them to a new SSL context.
2020-03-04 20:14:47 -08:00
A.J. Beamon
d1e1fea42d Our binaries that act like clients (fdbcli, backup and DR binaries) were reporting an unknown client version. Clients did not react if the list of supported versions changed. 2020-02-28 09:35:21 -08:00
Evan Tschannen
c3299b8ebe if tls cannot be initialized, throw an error from createDatabase 2020-02-26 18:53:06 -08:00
Evan Tschannen
d1598e7c99 set_verify_peers throws an error instead of returning a value 2020-02-26 16:06:16 -08:00
Evan Tschannen
2586bade68 re-added support for configuration TLS options with environment variables 2020-02-26 15:33:48 -08:00
Evan Tschannen
13a523a355 fix: commit on first proxy did not always commit to the first proxy 2020-02-25 12:34:31 -08:00
A.J. Beamon
4c696d5bf2 Merge branch 'release-6.2' into dd-better-rebalance-logging
# Conflicts:
#	fdbserver/DataDistributionQueue.actor.cpp
2020-02-21 17:41:00 -08:00
A.J. Beamon
6810a03283 Add more logging to valley filler and mountain chopper 2020-02-21 10:55:14 -08:00
Evan Tschannen
08c318d28a re-added the connect lock in the fdbcli so that the timeout is not spent before a connection has been initiated (because of the handshake lock) 2020-02-20 10:43:34 -08:00
Evan Tschannen
fd8a58b035 re-added support for the TLS_DISABLED flag 2020-02-19 18:37:47 -08:00
Evan Tschannen
761da5a059 code cleanup 2020-02-19 17:59:45 -08:00
Alex Miller
88d36af9c7 Fix --tls_password and add better error logging
This refactors all tls settings into a TLSParams object so that we can
set the password before loading any certificates.

It turns out that the FDBLibTLS code did really nice things with error
logging, but I just didn't understand openssl enough before to realize
what pieces I should be copying.
2020-02-19 00:57:05 -08:00
Alex Miller
e390dbd36c Add a non-FDBLibTLS verify peers framework to new TLS impl 2020-02-06 21:06:52 -08:00
Evan Tschannen
38d8d0d675 fixed simulation 2020-02-06 19:29:31 -08:00
Evan Tschannen
84853dd1fd switched SSL implementation to use boost ssl 2020-02-04 14:56:40 -08:00
Evan Tschannen
c93ca04ea6 Do not merge more than 100 shards together to avoid creating untrackable shards 2020-01-15 09:33:27 -08:00
Evan Tschannen
4aab9b7bc8 fix: clients would waste time attempting to read from a remote region when it was in the process of catching up 2020-01-10 12:23:59 -08:00
A.J. Beamon
290cbb7628 Fix an internal error that occurred when using client buggify and a successful transaction was failed with commit_unknown_result.
Move some buggify errors into a try catch block so that the normal error handling path can run.
Initialize startTime so that it's valid in the case of errors thrown early.
2019-12-09 09:44:48 -08:00
Andrew Noyes
34dedc9a62 Fix whitespace 2019-09-05 16:44:58 -07:00
Andrew Noyes
c18c4c1b83 Use a transaction option to control includePort behavior 2019-09-05 14:58:39 -07:00
Andrew Noyes
11f6adf645 Treat \xff\xff prefix as 'includePort' for get_addresses_for_key 2019-09-04 17:47:40 -07:00
Evan Tschannen
dc1d055b27
Merge pull request #2042 from senthil-ram/snap_cli_fix
fix fdbcli --exec 'snapshot create.sh' failure
2019-08-30 13:40:38 -07:00
Evan Tschannen
a7237c4302
Merge pull request #2045 from atn34/disallow-scalar-network-messages
Disallow scalar network messages
2019-08-30 13:38:54 -07:00
sramamoorthy
b3277f2982 Fix #2009 posix compliant args for snapshot binary 2019-08-30 12:54:09 -07:00
Andrew Noyes
b5f9e9f307 Move comment above if 2019-08-28 15:21:58 -07:00
Andrew Noyes
6aa0ada7b1 Replace scalar root types with proper messages 2019-08-28 14:40:50 -07:00
sramamoorthy
7a9097ea01 make fdbcli --exec 'snapshot create.sh' to succeed 2019-08-27 16:44:19 -07:00
sramamoorthy
5d87443323 improved error msgs for snapshot cmd 2019-08-27 16:43:52 -07:00
A.J. Beamon
c4004a4eea Don't count read version requests if we've already started one. Also avoid some other work that only needs to be done if we haven't started a read version request. 2019-08-12 15:55:48 -07:00
Evan Tschannen
c9fa7237f1 Merge branch 'master' of github.com:apple/foundationdb 2019-08-06 16:40:14 -07:00
Evan Tschannen
ba54508c47 code cleanup 2019-08-06 16:30:30 -07:00
mpilman
370ba8b841 Remove --object-serializer flag from executables 2019-08-06 09:25:40 -07:00
Evan Tschannen
69e7ed3e53
Merge pull request #1932 from etschannen/master
Bug fixes for rare bugs found by simulation
2019-07-30 17:18:30 -07:00
sramamoorthy
63941e0d96 disable DD with a in-memory flag and use in snapv2 2019-07-30 17:04:51 -07:00
Evan Tschannen
5c978f6129 fix: switchConnectionFile could get the proxies out of the clientInfo and continue connecting to the wrong cluster 2019-07-30 16:32:26 -07:00
Evan Tschannen
5c98dcce6d revert the proxy forwarding path, because it is no longer necessary as clients keep a persistent connection open with coordinators 2019-07-27 16:46:22 -07:00
Evan Tschannen
b509a441e7 Merge branch 'master' into feature-skip-confirm
# Conflicts:
#	bindings/flow/tester/Tester.actor.cpp
#	bindings/go/src/_stacktester/stacktester.go
#	bindings/java/src/test/com/apple/foundationdb/test/AsyncStackTester.java
#	bindings/java/src/test/com/apple/foundationdb/test/StackTester.java
#	bindings/python/tests/tester.py
#	bindings/ruby/tests/tester.rb
#	documentation/sphinx/source/api-c.rst
#	documentation/sphinx/source/api-python.rst
#	documentation/sphinx/source/api-ruby.rst
#	documentation/sphinx/source/data-modeling.rst
#	documentation/sphinx/source/developer-guide.rst
#	fdbclient/vexillographer/fdb.options
#	fdbserver/MasterProxyServer.actor.cpp
2019-07-27 15:08:13 -07:00
Evan Tschannen
d1c7ab325b fix: getConnectionFile could crash when connectionFile is null 2019-07-27 13:02:06 -07:00
Evan Tschannen
1c4028d71e fixed merge conflict error 2019-07-26 16:09:46 -07:00
Evan Tschannen
90e3b50213 Merge branch 'master' into feature-coordinator-connection
# Conflicts:
#	fdbclient/DatabaseContext.h
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/NativeAPI.actor.h
#	fdbserver/workloads/KillRegion.actor.cpp
2019-07-26 15:05:02 -07:00