redict/tests
Yossi Gottlieb bb7cd97439
Add hostname support in Sentinel. (#8282)
This is both a bugfix and an enhancement.

Internally, Sentinel relies entirely on IP addresses to identify
instances. When configured with a new master, it also requires users to
specify and IP and not hostname.

However, replicas may use the replica-announce-ip configuration to
announce a hostname. When that happens, Sentinel fails to match the
announced hostname with the expected IP and considers that a different
instance, triggering reconfiguration, etc.

Another use case is where TLS is used and clients are expected to match
the hostname to connect to with the certificate's SAN attribute. To
properly implement this configuration, it is necessary for Sentinel to
redirect clients to a hostname rather than an IP address.

The new 'resolve-hostnames' configuration parameter determines if
Sentinel is willing to accept hostnames. It is set by default to no,
which maintains backwards compatibility and avoids unexpected DNS
resolution delays on systems with DNS configuration issues.

Internally, Sentinel continues to identify instances by their resolved
IP address and will also report the IP by default. The new
'announce-hostnames' parameter determines if Sentinel should prefer to
announce a hostname, when available, rather than an IP address. This
applies to addresses returned to clients, as well as their
representation in the configuration file, REPLICAOF configuration
commands, etc.

This commit also introduces SENTINEL CONFIG GET and SENTINEL CONFIG SET
which can be used to introspect or configure global Sentinel
configuration that was previously was only possible by directly
accessing the configuration file and possibly restarting the instance.

Co-authored-by: myl1024 <myl92916@qq.com>
Co-authored-by: sundb <sundbcn@gmail.com>
2021-01-28 12:09:11 +02:00
..
assets Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
cluster Optimize performance of clusterGenNodesDescription for large clusters (#8182) 2021-01-13 12:36:03 -08:00
helpers revert an accidental test code change done as part of the tls project 2019-12-01 16:10:09 +02:00
integration GETEX, GETDEL and SET PXAT/EXAT (#8327) 2021-01-27 19:47:26 +02:00
modules Fix recent test failures (#8386) 2021-01-23 21:53:58 +02:00
sentinel Add hostname support in Sentinel. (#8282) 2021-01-28 12:09:11 +02:00
support Add tests for RESP3 responce of ZINTER and ZRANGE (#8391) 2021-01-26 17:55:32 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit Add 'set-proc-title' config so that this mechanism can be disabled (#3623) 2021-01-28 11:12:39 +02:00
instances.tcl Add hostname support in Sentinel. (#8282) 2021-01-28 12:09:11 +02:00
test_helper.tcl Fix rare test failures due to repl-ping-replica-period (#8393) 2021-01-25 11:05:25 +02:00