Bug #113244 set ‘deleteBackupData’ field, no effect

Submitted: 28 Nov 2023 7:35 Modified: 30 Nov 2023 13:33
Reporter: Bing Ma (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Operator Severity:S2 (Serious)
Version:8.2.0-2.1.1 OS:Linux
Assigned to: CPU Architecture:Any

[28 Nov 2023 7:35] Bing Ma
Description:
https://github.com/mysql/mysql-operator/blob/f708a303ad5878e4b6d0ecb393f4351afc1ab89d/helm...

in the crd.yaml, the description of deleteBackupData is: "Whether to delete the backup data in case the MySQLBackup object created by the job is deleted"

---
I have write this yaml, set deleteBackupData: true, when I delete the mbk resource, the backup files in minio still exists

apiVersion: mysql.oracle.com/v2
kind: MySQLBackup
metadata:
  name: a-cool-one-off-mgr1128
spec:
  clusterName: mgr1128
  backupProfile:
    name: s3-backup-profile
    dumpInstance:
      dumpOptions:
#        excludeSchemas: [ "information_schema", "mysql", "mysql_innodb_cluster_metadata", "performance_schema" ]
      storage:
        s3:
          bucketName: mabing
          prefix: mgr-backup
          config: s3-secret
          endpoint: http://10.6.178.185:80
  deleteBackupData: true

---
k get mbk
NAME                     CLUSTER   STATUS      OUTPUT                                   AGE
a-cool-one-off-mgr1128   mgr1128   Completed   a-cool-one-off-mgr1128-20231128-071401   2m34s
mgr-backup-1128          mgr1128   Completed   mgr-backup-1128-20231128-055945          76m

k delete mbk a-cool-one-off-mgr1128 
mysqlbackup.mysql.oracle.com "a-cool-one-off-mgr1128" deleted

How to repeat:
create a backup,set deleteBackupData: true, delete the mbk resource, expect the backup data in minio shouled be deleted
[30 Nov 2023 13:33] MySQL Verification Team
Hi,

Thank you for report.
[2 Apr 11:36] Nuno Tavares
I had a (very quick) look at the code, there doesn't seem anything implemented regarding deleteBackupData....

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.