Skip to content

Commit 0027228

Browse files
committed
Remove label as a selector
We shouldn't rely on label as a selector. Old environments had different name and label may also change in future. Use --all instead to delete all instances of resources, in the namespace of specified resource types This also unifies the approach with data plane cleanup Closes-Bug: OSPCIX-803
1 parent d7bb76e commit 0027228

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/roles/pcp_cleanup/tasks/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
{{ shell_header }}
44
{{ oc_header }}
55
# Cleanup OpenStackControlPlane object
6-
oc delete --ignore-not-found=true osctlplane -l core.openstack.org/openstackcontrolplane
6+
oc delete --ignore-not-found=true OpenStackControlPlane --all || true
77
88
# Ensure that all pods in openstack namespace are deleted
99
while oc get pod | grep -E 'rabbitmq-server-0|openstack-galera-0'; do
1010
sleep 2;
1111
done
1212
1313
# Cleanup OpenStackDataplane objects
14-
oc delete --ignore-not-found=true OpenStackDataPlaneDeployment --all
15-
oc delete --ignore-not-found=true OpenStackDataPlaneNodeSet --all
16-
oc delete --ignore-not-found=true OpenStackDataPlaneService --all
14+
oc delete --ignore-not-found=true OpenStackDataPlaneDeployment --all || true
15+
oc delete --ignore-not-found=true OpenStackDataPlaneNodeSet --all || true
16+
oc delete --ignore-not-found=true OpenStackDataPlaneService --all || true
1717
1818
# Delete Adoption helper pods
1919
oc delete --ignore-not-found=true --wait=false pod mariadb-copy-data

0 commit comments

Comments
 (0)