File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 5656 fi
5757 shell : bash
5858
59- - name : Delete clusters if control node not tagged with keep
59+ - name : Delete clusters
6060 run : |
6161 . venv/bin/activate
6262 if [[ -z ${ci_clusters} ]]; then
@@ -69,12 +69,12 @@ jobs:
6969 echo "Processing cluster: $cluster_prefix"
7070
7171 # Get all servers with the matching name for control node
72- CONTROL_SERVERS=$(openstack server list --name ${cluster_prefix}-control --long -- format json)
72+ CONTROL_SERVERS=$(openstack server list --name ${cluster_prefix}-control --format json)
7373
7474 # Get unique server names to avoid duplicate cleanup
7575 UNIQUE_NAMES=$(echo "$CONTROL_SERVERS" | jq -r '.[].Name' | sort | uniq)
7676 for name in $UNIQUE_NAMES; do
77- echo "Checking control node: $name"
77+ echo "Deleting cluster with control node: $name"
7878
7979 # Get the first matching server ID by name
8080 server=$(echo "$CONTROL_SERVERS" | jq -r '.[] | select(.Name=="'"$name"'") | .ID' | head -n1)
8585 continue
8686 fi
8787
88- # Get tags for the server
89- TAGS=$(openstack server show "$server" --column tags --format value)
90-
91- if [[ $TAGS =~ "keep" ]]; then
92- echo "Skipping $cluster_prefix - control instance is tagged as keep"
93- else
94- echo "Deleting cluster $cluster_prefix (server $server)..."
95- ./dev/delete-cluster.py $cluster_prefix --force
96- fi
88+ echo "Deleting cluster $cluster_prefix (server $server)..."
89+ ./dev/delete-cluster.py $cluster_prefix --force
9790 done
9891 done
9992 shell : bash
You can’t perform that action at this time.
0 commit comments