Skip to content

Commit 14a0122

Browse files
stuggiclaude
andcommitted
Add Galera database PVC deletion to cleanup playbook
The cleanup now deletes both types of Galera PVCs: 1. Backup storage PVCs (openstack.org/backup=true label) - Created by GaleraBackup CRs - Contain database dump files - Restored from OADP backup 2. Galera database PVCs (app=galera label) - Created by Galera StatefulSet - Contain live database data - Recreated and restored from database dumps during restore Both types must be deleted during cleanup to ensure clean restore from backup. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 93e0e89 commit 14a0122

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

docs/dev/playbooks/cleanup-openstack-ctlplane.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- GaleraRestore CRs
7070
- GaleraBackup CRs
7171
- PVCs labeled with openstack.org/backup=true (Galera backups, Glance, Cinder, Swift, Manila)
72+
- Galera database PVCs (app=galera)
7273
- RabbitMQUser CRs (all)
7374
- RabbitMQ restored-user secrets
7475
- Certificates and secrets (excluding EDPM/compute certs and Ceph)
@@ -179,23 +180,30 @@
179180
ansible.builtin.debug:
180181
msg: "✓ GaleraRestore and GaleraBackup CRs deleted"
181182

182-
- name: Step 4 - Delete PVCs with backup label
183+
- name: Step 4 - Delete PVCs
183184
ansible.builtin.debug:
184185
msg:
185186
- "========================================"
186-
- "Step 4: Deleting PVCs with backup label"
187+
- "Step 4: Deleting PVCs"
187188
- "========================================"
188-
- "(Galera backups, Glance, Cinder, Swift, Manila)"
189+
- "Backup storage PVCs (Galera backups, Glance, Cinder, Swift, Manila)"
190+
- "Galera database PVCs"
189191

190192
- name: Delete PVCs labeled for backup
191193
ansible.builtin.shell: |
192194
oc delete pvc -n {{ openstack_namespace }} -l openstack.org/backup=true
193195
changed_when: true
194196
failed_when: false
195197

198+
- name: Delete Galera database PVCs
199+
ansible.builtin.shell: |
200+
oc delete pvc -n {{ openstack_namespace }} -l app=galera
201+
changed_when: true
202+
failed_when: false
203+
196204
- name: Print PVC cleanup status
197205
ansible.builtin.debug:
198-
msg: "✓ PVCs with openstack.org/backup=true label deleted"
206+
msg: "✓ PVCs with openstack.org/backup=true label and Galera database PVCs deleted"
199207

200208
- name: Step 5 - Delete RabbitMQUser CRs and restored secrets
201209
ansible.builtin.debug:

0 commit comments

Comments
 (0)