Update jepsen and scp

This commit is contained in:
Antonio Andelic 2022-05-31 13:53:45 +00:00
parent cd602b20cd
commit 792adb0576
2 changed files with 20 additions and 1 deletions

View File

@ -7,7 +7,7 @@
:main jepsen.clickhouse-keeper.main
:plugins [[lein-cljfmt "0.7.0"]]
:dependencies [[org.clojure/clojure "1.10.1"]
[jepsen "0.2.3"]
[jepsen "0.2.6"]
[zookeeper-clj "0.9.4"]
[org.apache.zookeeper/zookeeper "3.6.1" :exclusions [org.slf4j/slf4j-log4j12]]]
:repl-options {:init-ns jepsen.clickhouse-keeper.main})

View File

@ -10,6 +10,25 @@
[jepsen.control.util :as cu]
[jepsen.os.ubuntu :as ubuntu]))
(ns jepsen.control.scp)
(defn scp!
"Runs an SCP command by shelling out. Takes a conn-spec (used for port, key,
etc), a seq of sources, and a single destination, all as strings."
[conn-spec sources dest]
(apply util/sh "scp" "-rpC"
"-P" (str (:port conn-spec))
(concat (when-let [k (:private-key-path conn-spec)]
["-i" k])
(if-not (:strict-host-key-checking conn-spec)
["-o StrictHostKeyChecking=no"])
sources
[dest]))
nil)
(ns jepsen.clickhouse-keeper.db)
(defn get-clickhouse-url
[url]
(non-precise-cached-wget! url))