31 Commits

Author SHA1 Message Date
John Sully
14daf6f909 Merge tag '6.0.8' into unstable
Former-commit-id: 4c7e4b91a6bb2034636856b608b8c386d07f5541
2020-09-30 19:47:55 +00:00
Eran Liberty
7fa69e6394 Allow exec with read commands on readonly replica in cluster (#7766)
There was a bug. Although cluster replicas would allow read commands,
they would not allow a MULTI-EXEC that's composed solely of read commands.
Adds tests for coverage.

Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Eran Liberty <eranl@amazon.com>
(cherry picked from commit 7bee51bb5b2cccbaae76f4721761880acf4d5a93)
2020-09-10 14:09:00 +03:00
Oran Agra
d37b034321 fix broken cluster/sentinel tests by recent commit (#7752)
da723a917 added a file for stderr to keep valgrind log but i forgot to
add a similar thing when valgrind isn't being used.
the result is that `glob */err.txt` fails.

(cherry picked from commit 470de9a516b0dcb92acb8cf2841ddac604bcbd3a)
2020-09-10 14:09:00 +03:00
Oran Agra
540841d6f7 Improve valgrind support for cluster tests (#7725)
- redirect valgrind reports to a dedicated file rather than console
- try to avoid killing instances with SIGKILL so that we get the memory
  leak report (killing with SIGTERM before resorting to SIGKILL)
- search for valgrind reports when done, print them and fail the tests
- add --dont-clean option to keep the logs on exit
- fix exit error code when crash is found (would have exited with 0)

changes that affect the normal redis test suite:
- refactor check_valgrind_errors into two functions one to search and
  one to report
- move the search half into util.tcl to serve the cluster tests too
- ignore "address range perms" valgrind warnings which seem non relevant.

(cherry picked from commit da723a917dec7f2514d821a615668e158bb4f60c)
2020-09-10 14:09:00 +03:00
Oran Agra
6041fc99b5 Reduce the probability of failure when start redis in runtest-cluster #7554 (#7635)
When runtest-cluster, at first, we need to create a cluster use spawn_instance,
a port which is not used is choosen, however sometimes we can't run server on
the port. possibley due to a race with another process taking it first.
such as redis/redis/runs/896537490. It may be due to the machine problem or
In order to reduce the probability of failure when start redis in
runtest-cluster, we attemp to use another port when find server do not start up.

Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: yanhui13 <yanhui13@meituan.com>
(cherry picked from commit 1deaad884c38e92e5b691f36b253ef4ee2201ca4)
2020-09-01 09:27:58 +03:00
杨博东
b42976bd56 Fix flock cluster config may cause failure to restart after kill -9 (#7674)
After fork, the child process(redis-aof-rewrite) will get the fd opened
by the parent process(redis), when redis killed by kill -9, it will not
graceful exit(call prepareForShutdown()), so redis-aof-rewrite thread may still
alive, the fd(lock) will still be held by redis-aof-rewrite thread, and
redis restart will fail to get lock, means fail to start.

This issue was causing failures in the cluster tests in github actions.

Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit 5e6212e087c4696abc682b64079202c9ade8666c)
2020-09-01 09:27:58 +03:00
WuYunlong
b80f2ec8ac Fix out of update help info in tcl tests. (#7516)
Before this commit, the output of "./runtest-cluster --help" is incorrect.
After this commit, the format of the following 3 output is consistent:
./runtest --help
./runtest-cluster --help
./runtest-sentinel --help

(cherry picked from commit 24b6f62741483f3f695838c0ad091f1931c36df5)
2020-07-20 21:08:26 +03:00
John Sully
ed2e0e66f6 Merge tag '6.0.4' into unstable
Redis 6.0.4.


Former-commit-id: 9c31ac7925edba187e527f506e5e992946bd38a6
2020-05-29 00:57:07 -04:00
Oran Agra
4653d796f0 tests: each test client work on a distinct port range
apparently when running tests in parallel (the default of --clients 16),
there's a chance for two tests to use the same port.
specifically, one test might shutdown a master and still have the
replica up, and then another test will re-use the port number of master
for another master, and then that replica will connect to the master of
the other test.

this can cause a master to count too many full syncs and fail a test if
we run the tests with --single integration/psync2 --loop --stop

see Probmem 2 in #7314
2020-05-28 10:09:51 +02:00
John Sully
009895cc65 Log stdout and stderr for cluster tests
Former-commit-id: 06143c2e8cab5c201ce41b85fcac70a36f2626c1
2020-04-15 16:35:24 -04:00
John Sully
6193e9ad4f Merge remote-tracking branch 'redis/6.0' into redis_merge
Former-commit-id: ef9a3cadcf94326bf2f163db7698aad9a3c01690
2020-01-27 02:55:48 -05:00
Yossi Gottlieb
10ffeb03e4 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
John Sully
219b0f7441 complete rebranding with tests passing
Former-commit-id: 3e9b8677098059964f3f7a492394da4ede9bd37d
2019-02-09 10:11:46 -05:00
Chris Lamb
b27434b11f Correct spelling of "faield". 2017-08-12 22:21:03 -07:00
antirez
609762bbe1 Test: Handle LOADING in restart_instance. 2016-01-15 16:50:35 +01:00
antirez
e033f08b4a Detect and show crashes on Sentinel/Cluster tests. 2016-01-15 10:20:35 +01:00
antirez
329b84da93 Cluster test: do leaks detection with OSX leaks utility. 2016-01-02 13:14:23 +01:00
antirez
889ef9d003 Cluster/Sentinel test: report ability to run via valgrind. 2015-12-29 15:27:26 +01:00
antirez
01a41c0d9c Sentinel / Cluster test: exit with non-zero error code on failures. 2015-03-30 14:29:01 +02:00
antirez
a301cd0de4 Avoid duplicated instance execution code in Cluster test. 2015-01-22 18:59:39 +01:00
antirez
3f759958ac Cluster test: wait for port to unbound in kill_instance.
Otherwise kill_instance + restart_instance in short succession will
still find the port busy and will fail.
2015-01-21 16:47:36 +01:00
antirez
b71060f360 Cluster/Sentinel test: also pause on abort_sentinel_test call. 2015-01-21 16:18:34 +01:00
Matt Stancliff
e240d16cc9 Add --track-origins=yes to valgrind 2015-01-21 15:48:19 +01:00
Matt Stancliff
52aa050a79 Tell sentinel/cluster tests to allow valgrind 2015-01-21 15:04:12 +01:00
Matt Stancliff
a13ea7e6d4 Spell software correctly 2014-09-29 06:49:07 -04:00
antirez
91c02dff33 Test: fix instances.tcl restart_instance abort error. 2014-06-30 12:06:27 +02:00
antirez
beba266b38 Sentienl/Redis test: enable link reconnection in instances.tcl. 2014-06-18 15:55:04 +02:00
antirez
fbdcdf6af9 Cluster test: added show-redis-logs command in the interactive console. 2014-06-10 15:22:40 +02:00
antirez
4b708f6f0b Cluster test: proper initialization at unit startup. 2014-05-19 11:24:15 +02:00
antirez
f21dee6537 Cluster / Sentinel test: instances count moved to run.tcl. 2014-04-29 16:17:15 +02:00
antirez
c102ad59e9 Sentinel test files / directories layout improved.
The test now runs in a self-contained directory.
The general abstractions to run the tests in an environment where
mutliple instances are executed at the same time was extrapolated into
instances.tcl, that will be reused to test Redis Cluster.
2014-04-24 11:08:22 +02:00