aboutsummaryrefslogtreecommitdiff
path: root/scenarios/fragments
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-09-23 18:47:13 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-09-23 18:47:13 +0200
commit5b460dd10ffe703189c7bff755d005a20b1e3e69 (patch)
treefa009e16ae8c78b1349508d51e69df63f42b16dd /scenarios/fragments
parent4a02f16489235d701afeccc5203895c9923c131a (diff)
downloadmknet-5b460dd10ffe703189c7bff755d005a20b1e3e69.tar.gz
mknet-5b460dd10ffe703189c7bff755d005a20b1e3e69.zip
Done some measurements for s3lat with Garage
Diffstat (limited to 'scenarios/fragments')
-rw-r--r--scenarios/fragments/garage.py5
-rw-r--r--scenarios/fragments/minio.py8
2 files changed, 9 insertions, 4 deletions
diff --git a/scenarios/fragments/garage.py b/scenarios/fragments/garage.py
index 8699655..84ca90a 100644
--- a/scenarios/fragments/garage.py
+++ b/scenarios/fragments/garage.py
@@ -38,9 +38,10 @@ if 'HOST' in env:
config = storage_path / "garage.toml"
env['GARAGE_CONFIG_FILE'] = str(config)
-def deploy_coord(version=None, target=None):
+def deploy_coord():
destroy()
shared.log("start daemon")
+ shared.exec(f"{version['path']} --version")
daemon()
shared.log("discover nodes")
connect()
@@ -50,7 +51,7 @@ def deploy_coord(version=None, target=None):
create_key()
shared.log("ready")
-def deploy_follow(version=None, target=None):
+def deploy_follow():
destroy()
shared.log("start daemon")
daemon()
diff --git a/scenarios/fragments/minio.py b/scenarios/fragments/minio.py
index 1bdd882..8b0e970 100644
--- a/scenarios/fragments/minio.py
+++ b/scenarios/fragments/minio.py
@@ -113,8 +113,12 @@ def sync_on_bucket_up():
def sync_on_bucket_down():
while True:
- if not client.bucket_exists("sync"): break
- time.sleep(1)
+ try:
+ if not client.bucket_exists("sync"): break
+ time.sleep(1)
+ except Exception as e:
+ shared.log("the cluster is probably already half shutdown, so errors are expected ->", e)
+ break
def delete_sync_bucket():
client.remove_bucket("sync")