Skip to content

Commit 030221c

Browse files
committed
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.
1 parent 10287c5 commit 030221c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stale.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ list_network() {
116116
res="$(openstack network show -f json -c created_at -c name "$resource_id")"
117117
creation_time="$(jq -r '.created_at' <<< "$res")"
118118
name="$(jq -r '.name' <<< "$res")"
119-
if [[ "$name" = *"hostonly"* ]] || [[ "$name" = *"external"* ]] || [[ "$name" = *"sahara-access"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"slaac"* ]]; then
119+
if [[ "$name" = *"hostonly"* ]] || [[ "$name" = "external"* ]] || [[ "$name" = *"sahara-access"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"slaac"* ]]; then
120120
continue
121121
fi
122122
printf '%s %s %s\n' "$resource_id" "$creation_time" "$name"
@@ -128,7 +128,7 @@ list_subnet() {
128128
res="$(openstack subnet show -f json -c updated_at -c name "$resource_id")"
129129
update_time="$(jq -r '.updated_at' <<< "$res")"
130130
name="$(jq -r '.name' <<< "$res")"
131-
if [[ "$name" = *"hostonly"* ]] || [[ "$name" = *"external"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"slaac"* ]]; then
131+
if [[ "$name" = *"hostonly"* ]] || [[ "$name" = "external"* ]] || [[ "$name" = *"public"* ]] || [[ "$name" = *"mellanox"* ]] || [[ "$name" = *"intel"* ]] || [[ "$name" = *"slaac"* ]]; then
132132
continue
133133
fi
134134
printf '%s %s %s\n' "$resource_id" "$update_time" "$name"

0 commit comments

Comments
 (0)