From 2e74d3f76c1bad9b557b0fa003f031b13b8bf7a1 Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Tue, 14 Nov 2023 10:58:14 -0600 Subject: [PATCH] Fix Signed-off-by: Tyler Gu --- performance_measurement/measure_runner.py | 2 +- performance_measurement/rabbitmq_inputs.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/performance_measurement/measure_runner.py b/performance_measurement/measure_runner.py index 590bb3da1..67da1eb33 100644 --- a/performance_measurement/measure_runner.py +++ b/performance_measurement/measure_runner.py @@ -756,7 +756,7 @@ def wait_for_converge(input: dict, apiclient: kubernetes.client.ApiClient, names statefulset_stream = watch.stream(func=appV1Api.list_namespaced_stateful_set, namespace=namespace, field_selector="metadata.name=%s" % sts_name) - timer_hard_timeout = acto_timer.ActoTimer(600, statefulset_updates_queue, "timeout") + timer_hard_timeout = acto_timer.ActoTimer(900, statefulset_updates_queue, "timeout") watch_process = Process(target=MeasurementRunner.watch_system_events, args=(statefulset_stream, statefulset_updates_queue)) diff --git a/performance_measurement/rabbitmq_inputs.py b/performance_measurement/rabbitmq_inputs.py index 0a00bfcf0..d61d632a9 100644 --- a/performance_measurement/rabbitmq_inputs.py +++ b/performance_measurement/rabbitmq_inputs.py @@ -19,9 +19,14 @@ def serialize(self, output_dir: str): reference_input_dir = os.path.join(output_dir, "reference") os.makedirs(anvil_input_dir, exist_ok=True) os.makedirs(reference_input_dir, exist_ok=True) + prev_replicas = 3 for input in self.all_inputs: print(f"{input['trial']}") input["input"]["spec"]["image"] = "ghcr.io/xlab-uiuc/rabbitmq:3.11.10-management" + if "replicas" in input["input"]["spec"] and input["input"]["spec"]["replicas"] > prev_replicas: + prev_replicas = input["input"]["spec"]["replicas"] + else: + input["input"]["spec"]["replicas"] = prev_replicas patch = jsonpatch.JsonPatch.from_diff(previous_input, input["input"]) if patch: with open(os.path.join(anvil_input_dir, f'input-{index:03d}.yaml'), 'w') as f: