Skip to content

K8SPG-600: Fix failed backup status #820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2024
Merged

Conversation

pooknull
Copy link
Contributor

@pooknull pooknull commented Jun 24, 2024

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

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@pooknull pooknull changed the title Fix failed backup status K8SPG-600: Fix failed backup status Jun 24, 2024
@pooknull pooknull marked this pull request as ready for review June 24, 2024 12:10
egegunes
egegunes previously approved these changes Jun 24, 2024
inelpandzic
inelpandzic previously approved these changes Jun 24, 2024
@hors hors requested review from egegunes and inelpandzic June 24, 2024 17:35
@pooknull pooknull dismissed stale reviews from inelpandzic and egegunes via 066cdc9 June 24, 2024 17:40
@JNKPercona
Copy link
Collaborator

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: 066cdc9
image: perconalab/percona-postgresql-operator:PR-820-066cdc9de

@hors hors merged commit b4ffb38 into main Jun 25, 2024
15 checks passed
@hors hors deleted the dev/fix-failed-backup-status branch June 25, 2024 08:33
ptankov pushed a commit that referenced this pull request Jun 25, 2024
* Fix failed backup status

* fix lint

* fix fmt

* fix regression and status update
hors added a commit that referenced this pull request Jun 28, 2024
* K8SPG-597 Update images and versions for 2.4.0 release (#819)

* K8SPG-597 Update images and versions for 2.4.0 release

* supply minor tag versions

* update the image in upgrade.yaml

* K8SPG-600: Fix failed backup status (#820)

* Fix failed backup status

* fix lint

* fix fmt

* fix regression and status update

* K8SPG-518: Fix WAL archiving on Openshift (#823)

* K8SPG-597 Fixing test case upgrade-minor to work with postures images which have minor numbers in the image name (#821)

* We now have env var PG_VER so no need to calculate the version from the image name, also, the calculation was buggy when the version contains a dot and a minor number, e.g. 16.3

* Refactor upgrade-cluster.yaml to use PG_VER environment variable instead of calculating version from image name

* K8SPG-597 - Update monitoring test (#824)

* K8SPG-254: Fix major upgrade on Openshift (#826)

---------

Co-authored-by: Andrii Dema <a.dema@jazzserve.com>
Co-authored-by: Ege Güneş <ege.gunes@percona.com>
Co-authored-by: Tomislav Plavcic <tomislav.plavcic@percona.com>
Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants