Backup and pods are not deleted if the db cluster is deleted

Description

Tested on gke using v0.2.0 docker image in quickstart.yml
Create a mysql db cluster. Then take its backup. After the backup is successful, delete the db cluster. In the below, all the mysql database pods are deleted, but backup pod is not deleted.

kubectl get pods -n percona-everest xb-backup-mysql-ssbo7n-pjgqj 0/1 Completed 0 5h50m everest-operator-controller-manager-d7cc96598-bhtq4 2/2 Running 5 (5h35m ago) 6h44m percona-postgresql-operator-74dd9fd767-z6bn4 1/1 Running 0 6h44m percona-server-mongodb-operator-54d5d479c5-2294c 1/1 Running 5 (5h34m ago) 6h45m percona-xtradb-cluster-operator-6676f8f489-pmhrz 1/1 Running 6 (5h33m ago) 6h45m restore-job-restored-mysql-single-restored-mysql-single-j87sf 0/1 Completed 0 38m restore-job-restored-mysql-ssbo7n-restored-mysql-ssbo7n-kjb92 0/1 Completed 0 5h21m restored-mysql-single-haproxy-0 2/2 Running 0 38m restored-mysql-single-pxc-0 1/1 Running 0 38m restored-mysql-ssbo7n-haproxy-0 2/2 Running 0 71m restored-mysql-ssbo7n-haproxy-1 2/2 Running 0 71m restored-mysql-ssbo7n-haproxy-2 2/2 Running 0 70m restored-mysql-ssbo7n-pxc-0 1/1 Running 0 71m restored-mysql-ssbo7n-pxc-1 1/1 Running 0 71m restored-mysql-ssbo7n-pxc-2 1/1 Running 0 70m kubectl get pxc-backup -n percona-everest NAME CLUSTER STORAGE DESTINATION STATUS COMPLETED AGE backup-mysql-ssbo7n mysql-ssbo7n s3 [s3://xxxxxx/mysql-ssbo7n-2023-09-06-08:55:38-full] Succeeded 5h49m 5h50m

Environment

None

Attachments

2
  • 21 Sep 2023, 11:47 AM
  • 21 Sep 2023, 11:46 AM

Activity

Show:

Manish Chawla April 16, 2024 at 11:17 AM

This issue wasn’t observed after the mysql, mongodb databases were deleted.

The issue of the postgresql initial backup not being deleted will be fixed in https://perconadev.atlassian.net/browse/EVEREST-977.

Hence closing this issue.

Manish Chawla April 8, 2024 at 2:20 PM

Hi , This works for mysql and mongodb, but for postgresql, one backup remains after the database deletion

kubectl get pg-backup -n n1 NAME CLUSTER REPO DESTINATION STATUS TYPE COMPLETED AGE postgresql-oxu-backup-cws5-ttc8q postgresql-oxu repo1 Succeeded incremental 5h49m 5h49m

Please check, thanks.

Manish Chawla September 21, 2023 at 11:58 AM

If we create a new database with the same name as the one deleted, then it shows the old backups for the new database, which is incorrect as this is a new database for which no backups should exist, for example

To reproduce this
1. Create a mysql database with name mysql-abcd
2. Add some data and take two backups named backup-mysql-abcd and backup-mysql-abcd-2
3. Delete the mysql database
4. Create the mysql database again with the same name mysql-abcd
5. The same backups backup-mysql-abcd and backup-mysql-abcd-2 are displayed for the new database mysql-abcd
6. Use the backup-mysql-abcd to restore the backup to the same database, the mysql-abcd database comes up but the backup data isn't restored

Done

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

Smart Checklist

Created September 6, 2023 at 2:55 PM
Updated April 17, 2024 at 8:10 AM
Resolved April 16, 2024 at 11:17 AM

Flag notifications