From 4aeb00a882f4bc621cb4d38f8b6295372a1bd2d7 Mon Sep 17 00:00:00 2001 From: oviner Date: Tue, 17 Sep 2024 19:47:18 +0300 Subject: [PATCH] There is no need to run gather_odf_client script on non-provider setup Signed-off-by: oviner --- collection-scripts/gather_main | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/collection-scripts/gather_main b/collection-scripts/gather_main index 3e4bede..820df57 100755 --- a/collection-scripts/gather_main +++ b/collection-scripts/gather_main @@ -21,8 +21,15 @@ procids+=($!) gather_dr_resources & procids+=($!) -gather_odf_client & -procids+=($!) +storagecluster_remote=$(oc get storagecluster --all-namespaces -o yaml | grep -i 'allowRemoteStorageConsumers' || true) +if [ -n "$storagecluster_remote" ]; then + echo "it is provider cluster" + gather_odf_client & + procids+=($!) +else + echo "it is not provider cluster" +fi + # Check if procid array has any values, if so, wait for them to finish if [ ${#procids[@]} -ne 0 ]; then