percona / percona-postgresql-operator

Percona Operator for PostgreSQL
https://www.percona.com/doc/kubernetes-operator-for-postgresql/index.html
Apache License 2.0
254 stars 50 forks source link

K8SPG-600: Fix failed backup status #820

Closed pooknull closed 1 week ago

pooknull commented 1 week ago

https://perconadev.atlassian.net/browse/K8SPG-600

DESCRIPTION

Problem: If the user has the wrong pgbackrest credentials, the failed backup doesn't get the failed state in the pg-backup .status..

Reason: When incorrect pgbackrest credentials are used, the pg cluster reconcile fails, which stops the process of updating crunchy's postgrescluster resource. It is necessary to delete backup annotations from crunchy's resource, and this problem doesn't allow it to continue.

Solution: Don't stop the reconcile process with the pgbackrest error. Log the error message instead. Also, the operator should avoid trying to use pgbackrest when the backup job has failed.

CHECKLIST

Jira

Tests

Config/Logging/Testability

JNKPercona commented 1 week ago
Test name Status
custom-extensions passed
demand-backup passed
init-deploy passed
major-upgrade passed
monitoring passed
one-pod passed
operator-self-healing passed
pitr passed
scaling passed
scheduled-backup passed
self-healing passed
start-from-backup passed
tablespaces passed
telemetry-transfer passed
upgrade-consistency passed
upgrade-minor passed
users passed
We run 17 out of 17

commit: https://github.com/percona/percona-postgresql-operator/pull/820/commits/066cdc9dea65922f6120ac661e16ca1c1dd60022 image: perconalab/percona-postgresql-operator:PR-820-066cdc9de