From fe299c46ba1075dc5d133a9253b19cccfe63557e Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Nava Date: Wed, 31 Jul 2024 14:40:51 +0200 Subject: [PATCH] [ci_lvmns_storage] Wait for all LVMS nodes to be ready --- roles/ci_lvms_storage/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ci_lvms_storage/tasks/main.yml b/roles/ci_lvms_storage/tasks/main.yml index 045a3f1b09..26bf1adaff 100644 --- a/roles/ci_lvms_storage/tasks/main.yml +++ b/roles/ci_lvms_storage/tasks/main.yml @@ -154,3 +154,12 @@ - _cifmw_lvms_storage_cluster_lvmscluster_out.resources[0].status is defined - _cifmw_lvms_storage_cluster_lvmscluster_out.resources[0].status.ready is defined - _cifmw_lvms_storage_cluster_lvmscluster_out.resources[0].status.ready | bool + - _cifmw_lvms_storage_cluster_lvmscluster_out.resources[0].status.deviceClassStatuses is defined + - >- + _cifmw_lvms_storage_cluster_lvmscluster_out.resources[0].status.deviceClassStatuses | + selectattr("name", "defined") | + selectattr("nodeStatus", "defined") | + selectattr("name", "equalto", cifmw_lvms_storage_class) | + map(attribute="nodeStatus") | flatten | + selectattr("status", "defined") | + map(attribute="status") | unique | first | default("") == "Ready"