diff options
Diffstat (limited to 'scenarios')
-rw-r--r-- | scenarios/fragments/garage.py | 5 | ||||
-rw-r--r-- | scenarios/fragments/minio.py | 8 | ||||
-rwxr-xr-x | scenarios/garage-s3concurrent | 4 | ||||
-rwxr-xr-x | scenarios/garage-s3lat | 4 | ||||
-rwxr-xr-x | scenarios/garage-warp | 4 |
5 files changed, 15 insertions, 10 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") diff --git a/scenarios/garage-s3concurrent b/scenarios/garage-s3concurrent index f2b7128..13b93db 100755 --- a/scenarios/garage-s3concurrent +++ b/scenarios/garage-s3concurrent @@ -7,12 +7,12 @@ for fl in sys.argv[1:]: garage.version = flavor.garage[fl] if shared.id() == 1: - garage.deploy_coord(version=garage.version) + garage.deploy_coord() s3concurrent.on_garage() garage.delete_key() garage.destroy() else: - garage.deploy_follow(version=garage.version) + garage.deploy_follow() garage.sync_on_key_down() garage.destroy() shared.log("bye") diff --git a/scenarios/garage-s3lat b/scenarios/garage-s3lat index b0a8d0d..2f686bf 100755 --- a/scenarios/garage-s3lat +++ b/scenarios/garage-s3lat @@ -7,12 +7,12 @@ for fl in sys.argv[1:]: garage.version = flavor.garage[fl] if shared.id() == 1: - garage.deploy_coord(version=garage.version) + garage.deploy_coord() s3lat.on_garage() garage.delete_key() garage.destroy() else: - garage.deploy_follow(version=garage.version) + garage.deploy_follow() garage.sync_on_key_down() garage.destroy() shared.log("bye") diff --git a/scenarios/garage-warp b/scenarios/garage-warp index 5d338c0..6fd689f 100755 --- a/scenarios/garage-warp +++ b/scenarios/garage-warp @@ -9,12 +9,12 @@ for fl in sys.argv[1:]: warp.bench = flavor.warp[fl] if shared.id() == 1: - garage.deploy_coord(version=garage.version) + garage.deploy_coord() warp.on_garage(params=warp.bench) garage.delete_key() garage.destroy() else: - garage.deploy_follow(version=garage.version) + garage.deploy_follow() garage.sync_on_key_down() garage.destroy() shared.log("bye") |