From 030221cfc886bfddd9eaf503df0a7c11833de732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Wed, 22 Feb 2023 16:03:19 +0100 Subject: [PATCH] Relax regex for external subnets Now that we have subnets for externallb jobs, we need to relax the matching otherwise it fails to cleanup leaked resources by those jobs. --- stale.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stale.sh b/stale.sh index 71782da..02e2f21 100755 --- a/stale.sh +++ b/stale.sh @@ -116,7 +116,7 @@ list_network() { res="$(openstack network show -f json -c created_at -c name "$resource_id")" creation_time="$(jq -r '.created_at' <<< "$res")" name="$(jq -r '.name' <<< "$res")" - if [[ "$name" = *"hostonly"* ]] || [[ "$name" = *"external"* ]] || [[ "$name" = *"sahara-access"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"slaac"* ]]; then + if [[ "$name" = *"hostonly"* ]] || [[ "$name" = "external"* ]] || [[ "$name" = *"sahara-access"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"slaac"* ]]; then continue fi printf '%s %s %s\n' "$resource_id" "$creation_time" "$name" @@ -128,7 +128,7 @@ list_subnet() { res="$(openstack subnet show -f json -c updated_at -c name "$resource_id")" update_time="$(jq -r '.updated_at' <<< "$res")" name="$(jq -r '.name' <<< "$res")" - if [[ "$name" = *"hostonly"* ]] || [[ "$name" = *"external"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"slaac"* ]]; then + if [[ "$name" = *"hostonly"* ]] || [[ "$name" = "external"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"slaac"* ]]; then continue fi printf '%s %s %s\n' "$resource_id" "$update_time" "$name"