diff --git a/performance_measurement/measure_runner.py b/performance_measurement/measure_runner.py index 844d50a84..da22c7bd1 100644 --- a/performance_measurement/measure_runner.py +++ b/performance_measurement/measure_runner.py @@ -581,6 +581,8 @@ def wait_for_reference_rabbitmq_spec( logging.info("generation not matched") continue + break + def wait_for_rabbitmq_spec( input: dict, apiclient: kubernetes.client.ApiClient, namespace: str) -> bool: appV1Api = kubernetes.client.AppsV1Api(apiclient) @@ -597,33 +599,39 @@ def wait_for_rabbitmq_spec( # affinity desired_affinity = input["spec"]["affinity"] if "affinity" in input["spec"] else None if not check_affinity(desired_affinity, sts_object): + logging.info("affinity not matched") continue # annotations input_annotations = input["spec"]["annotations"] if "annotations" in input["spec"] else None if not check_annotations(input_annotations, sts_object): + logging.info("annotation not matched") continue # image if sts_object["spec"]["template"]["spec"]["containers"][0]["image"] != input["spec"]["image"]: + logging.info("image not matched") continue # labels input_labels = input["spec"]["labels"] if "labels" in input["spec"] else None if not check_labels(input_labels, sts_object): + logging.info("label not matched") continue # persistence if "persistence" in input["spec"]: pvc_template = sts_object["spec"]["volume_claim_templates"][0] - if "storage" in input["spec"]["persistence"]: + if "storage" in input["spec"]["persistence"] and input["spec"]["persistence"]["storage"] is not None: if pvc_template["spec"]["resources"]["requests"]["storage"] != input["spec"][ "persistence"]["storage"]: + logging.info("storage not matched") continue - if "storageClassName" in input["spec"]["persistence"]: + if "storageClassName" in input["spec"]["persistence"] and input["spec"]["persistence"]["storageClassName"] is not None: if pvc_template["spec"]["storage_class_name"] != input["spec"]["persistence"][ "storageClassName"]: + logging.info("storageClassName not matched") continue # persistentVolumeClaimRetentionPolicy @@ -631,28 +639,33 @@ def wait_for_rabbitmq_spec( "persistentVolumeClaimRetentionPolicy"] if "persistentVolumeClaimRetentionPolicy" in input["spec"] else None if not check_persistent_volume_claim_retention_policy( desired_persistent_volume_claim_retention_policy, sts_object): + logging.info("persistentVolumeClaimRetentionPolicy not matched") continue # podManagementPolicy if "podManagementPolicy" in input["spec"]: if sts_object["spec"]["pod_management_policy"] != input["spec"][ "podManagementPolicy"]: + logging.info("podManagementPolicy not matched") continue # rabbitmqConfig # replicas if sts_object["spec"]["replicas"] != input["spec"]["replicas"]: + logging.info("replicas not matched") continue # resources desired_resources = input["spec"]["resources"] if "resources" in input["spec"] else None if not check_resources(desired_resources, sts_object): + logging.info("resources not matched") continue # tolerations desired_tolerations = input["spec"]["tolerations"] if "tolerations" in input["spec"] else None if not check_tolerations(desired_tolerations, sts_object): + logging.info("tolerations not matched") continue # make sure the generation is up to date @@ -660,6 +673,8 @@ def wait_for_rabbitmq_spec( logging.info("generation not matched") continue + break + def wait_for_pod_ready( input: dict, apiclient: kubernetes.client.ApiClient, namespace: str) -> bool: coreV1Api = kubernetes.client.CoreV1Api(apiclient)