aboutsummaryrefslogtreecommitdiff
path: root/script/jepsen.garage/src/jepsen/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-18 14:01:18 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-18 14:01:18 +0200
commitef5ca86dfc2678e8fc16b99daffeac40093945ae (patch)
treefffe05d7dbd10c8cf8c0dd2e94985fca1966ea13 /script/jepsen.garage/src/jepsen/garage
parent9ec4cca3340cfd03deb55cd58d6b354630e7eb5f (diff)
downloadgarage-ef5ca86dfc2678e8fc16b99daffeac40093945ae.tar.gz
garage-ef5ca86dfc2678e8fc16b99daffeac40093945ae.zip
jepsen: update to garage 0.9.0
Diffstat (limited to 'script/jepsen.garage/src/jepsen/garage')
-rw-r--r--script/jepsen.garage/src/jepsen/garage/grg.clj14
1 files changed, 9 insertions, 5 deletions
diff --git a/script/jepsen.garage/src/jepsen/garage/grg.clj b/script/jepsen.garage/src/jepsen/garage/grg.clj
index 4597fb14..31f20852 100644
--- a/script/jepsen.garage/src/jepsen/garage/grg.clj
+++ b/script/jepsen.garage/src/jepsen/garage/grg.clj
@@ -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])))