mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-12-22 07:06:38 +00:00
jepsen: update to garage 0.9.0
This commit is contained in:
parent
9ec4cca334
commit
ef5ca86dfc
2 changed files with 10 additions and 6 deletions
|
@ -42,7 +42,7 @@
|
|||
(let [workload ((get workloads (:workload opts)) opts)
|
||||
garage-version (if (:increasing-timestamps opts)
|
||||
"03490d41d58576d7b3bcf977b2726d72a3a66ada"
|
||||
"v0.8.2")]
|
||||
"v0.9.0")]
|
||||
(merge tests/noop-test
|
||||
opts
|
||||
{:pure-generators true
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
; CONSTANTS -- HOW GARAGE IS SET UP
|
||||
|
||||
(def dir "/opt/garage")
|
||||
(def data-dir (str dir "/data"))
|
||||
(def meta-dir (str dir "/meta"))
|
||||
(def binary (str dir "/garage"))
|
||||
(def logfile (str dir "/garage.log"))
|
||||
(def pidfile (str dir "/garage.pid"))
|
||||
|
@ -54,18 +56,19 @@
|
|||
:chdir dir}
|
||||
binary
|
||||
:server)
|
||||
(Thread/sleep 100)
|
||||
(info node "garage daemon started")
|
||||
(c/exec :sleep 5)
|
||||
(let [node-id (c/exec binary :node :id :-q)]
|
||||
(info node "node id:" node-id)
|
||||
(c/on-many (:nodes test)
|
||||
(c/exec binary :node :connect node-id))
|
||||
(c/exec binary :layout :assign (subs node-id 0 16) :-c 1 :-z :dc1 :-t node))
|
||||
(c/exec binary :layout :assign (subs node-id 0 16) :-c :1G :-z :dc1 :-t node))
|
||||
(if (= node (first (:nodes test)))
|
||||
(do
|
||||
(Thread/sleep 2000)
|
||||
(c/exec :sleep 5)
|
||||
(c/exec binary :layout :apply :--version 1)
|
||||
(info node "garage status:" (c/exec binary :status))
|
||||
(c/exec binary :key :new :--name grg-key)
|
||||
(c/exec binary :key :create grg-key)
|
||||
(c/exec binary :bucket :create grg-bucket)
|
||||
(c/exec binary :bucket :allow :--read :--write grg-bucket :--key grg-key)
|
||||
(info node "key info: " (c/exec binary :key :info grg-key))))))
|
||||
|
@ -73,7 +76,8 @@
|
|||
(info node "tearing down garage" version)
|
||||
(c/su
|
||||
(cu/stop-daemon! binary pidfile)
|
||||
(c/exec :rm :-rf dir)))
|
||||
(c/exec :rm :-rf data-dir)
|
||||
(c/exec :rm :-rf meta-dir)))
|
||||
db/LogFiles
|
||||
(log-files [_ test node]
|
||||
[logfile])))
|
||||
|
|
Loading…
Reference in a new issue