You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 195de03
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mariadb): pin legacy Backups to a proven dump, refuse failed runs
A Backup taken before Backups recorded their dump gives a restore
nothing to pin. Refusing such Backups would leave every existing one
unrestorable, so a restore of one now makes the same ownership-proven
match the backup side makes, against the operator Backup it names, and
restores that dump by its timestamp. When no dump can be proven to be
the run's own, or the storage cannot be read, mariadb-operator restores
the newest dump under the prefix as it always did, and a BestEffortDump
Warning on the RestoreJob says so and why.
An operator Backup whose Job failed is Complete=True with reason
JobFailed, and a BackupJob that took Complete=True for success made a
Backup of it. That run left no dump of its own, and restoring it would
quietly bring back another run's dump, so the RestoreJob now fails
instead. The condition is read by its reason, because its status does
not tell a failure from a success.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <[email protected]>
getLogger(ctx).Info("no dump proven for a MariaDB Backup that records none; restoring the newest", "restorejob", rj.Name, "backup", backup.Name, "error", err)
"Backup %s records no dump and none in storage could be proven to belong to k8s.mariadb.com/Backup %s/%s (%v); mariadb-operator restores the newest dump under its prefix as a best effort, which may be another backup run's",
716
+
backup.Name, src.Namespace, src.Name, err)
717
+
return""
718
+
}
719
+
returndump.Timestamp.UTC().Format(time.RFC3339)
720
+
}
721
+
695
722
// awaitMariaDBDumpCheck keeps the RestoreJob waiting, with Ready=False
696
723
// saying why, while the dump it asks for cannot be checked, and fails it
697
724
// with the cause once the restore deadline has passed.
0 commit comments