Move jepsen tests to clickhouse-keeper

This commit is contained in:
alesapin 2021-05-12 16:31:29 +03:00
parent 41eadf9127
commit ed89af22b2
6 changed files with 16 additions and 19 deletions

View File

@ -1 +0,0 @@
../../../programs/server/config.xml

View File

@ -1,4 +1,12 @@
<yandex>
<listen_host>::</listen_host>
<logger>
<level>trace</level>
<log>/var/log/clickhouse-keeper/clickhouse-keeper.log</log>
<errorlog>/var/log/clickhouse-keeper/clickhouse-keeper.err.log</errorlog>
</logger>
<keeper_server>
<tcp_port>9181</tcp_port>
<server_id>{id}</server_id>

View File

@ -1,3 +0,0 @@
<yandex>
<listen_host>::</listen_host>
</yandex>

View File

@ -1 +0,0 @@
../../../programs/server/users.xml

View File

@ -89,10 +89,7 @@
(defn install-configs
[test node]
(c/exec :echo (slurp (io/resource "config.xml")) :> (str configs-dir "/config.xml"))
(c/exec :echo (slurp (io/resource "users.xml")) :> (str configs-dir "/users.xml"))
(c/exec :echo (slurp (io/resource "listen.xml")) :> (str sub-configs-dir "/listen.xml"))
(c/exec :echo (cluster-config test node (slurp (io/resource "keeper_config.xml"))) :> (str sub-configs-dir "/keeper_config.xml")))
(c/exec :echo (cluster-config test node (slurp (io/resource "keeper_config.xml"))) :> (str configs-dir "/keeper_config.xml")))
(defn collect-traces
[test node]
@ -144,7 +141,7 @@
(info node "Coordination files exists, going to compress")
(c/cd data-dir
(c/exec :tar :czf "coordination.tar.gz" "coordination")))))
(let [common-logs [stderr-file (str logs-dir "/clickhouse-server.log") (str data-dir "/coordination.tar.gz")]
(let [common-logs [stderr-file (str logs-dir "/clickhouse-keeper.log") (str data-dir "/coordination.tar.gz")]
gdb-log (str logs-dir "/gdb.log")]
(if (cu/exists? (str logs-dir "/gdb.log"))
(conj common-logs gdb-log)

View File

@ -143,7 +143,7 @@
[node test]
(info "Checking server alive on" node)
(try
(c/exec binary-path :client :--query "SELECT 1")
(zk-connect (name node) 9181 30000)
(catch Exception _ false)))
(defn wait-clickhouse-alive!
@ -169,16 +169,13 @@
:logfile stderr-file
:chdir data-dir}
binary-path
:server
:--config (str configs-dir "/config.xml")
:keeper
:--config (str configs-dir "/keeper_config.xml")
:--
:--path (str data-dir "/")
:--user_files_path (str data-dir "/user_files")
:--top_level_domains_path (str data-dir "/top_level_domains")
:--logger.log (str logs-dir "/clickhouse-server.log")
:--logger.errorlog (str logs-dir "/clickhouse-server.err.log")
:--logger.log (str logs-dir "/clickhouse-keeper.log")
:--logger.errorlog (str logs-dir "/clickhouse-keeper.err.log")
:--keeper_server.snapshot_storage_path coordination-snapshots-dir
:--keeper_server.logs_storage_path coordination-logs-dir)
:--keeper_server.log_storage_path coordination-logs-dir)
(wait-clickhouse-alive! node test)))
(defn md5 [^String s]