From 3af2ea95f0b378911491a1ca7b869e008d91e2ce Mon Sep 17 00:00:00 2001 From: VC Date: Fri, 5 Jul 2024 11:53:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20garage=5Fbucket=20was=20using?= =?UTF-8?q?=20dotted=20addresses=20which=20can=E2=80=99t=20be=20supported?= =?UTF-8?q?=20by=20Munin-Client=20This=20fixes=20it=20by=20reordering=20bu?= =?UTF-8?q?cket=20names=20when=20they=20contain=20a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/munin_client/files/garage_bucket | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/munin_client/files/garage_bucket b/roles/munin_client/files/garage_bucket index e4b1240..7ad9097 100644 --- a/roles/munin_client/files/garage_bucket +++ b/roles/munin_client/files/garage_bucket @@ -6,7 +6,7 @@ HEADER="Authorization: Bearer ${BEARER}" # Create associative array declare -A BUCKETS=() -API_BUCKETS_JSON=$(curl -s -H "${HEADER}" "http://[::1]:3903/v1/bucket?list" | jq -r '.[] | .id + "," + .globalAliases[0]') +API_BUCKETS_JSON=$(curl -s -H "${HEADER}" "http://[::1]:3903/v1/bucket?list" | jq -r '.[] | .id + "," + (if (.globalAliases[0]|test("\\.")) then .globalAliases[1] else .globalAliases[0] end)') # Populate associative array for bucket in ${API_BUCKETS_JSON}