Skip to content
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

K8SPSMDB-926: Implement PiTR for physical restores #1288

Merged
merged 12 commits into from
Sep 8, 2023
Merged

K8SPSMDB-926: Implement PiTR for physical restores #1288

merged 12 commits into from
Sep 8, 2023

Conversation

egegunes
Copy link
Contributor

@egegunes egegunes commented Aug 14, 2023

K8SPSMDB-926 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
PiTR with physical backups are not implemented.

Solution:
Implement PiTR using PBM v2.2.1. Note that to use PiTR with physical backups you need to use PBM v2.2.1 or above.

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?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are the manifests (crd/bundle) regenerated if needed?
  • 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 MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/L 100-499 lines label Aug 14, 2023
@egegunes egegunes force-pushed the K8SPSMDB-926 branch 2 times, most recently from 872b2da to 60d59ae Compare August 17, 2023 10:53
@pull-request-size pull-request-size bot added size/XL 500-999 lines and removed size/L 100-499 lines labels Aug 17, 2023
@egegunes egegunes marked this pull request as ready for review August 21, 2023 06:05
@pull-request-size pull-request-size bot added size/XXL 1000+ lines and removed size/XL 500-999 lines labels Aug 23, 2023
desc 'test passed'
}

main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
main
main

pkg/apis/psmdb/v1/psmdb_types.go Show resolved Hide resolved
@@ -26,6 +27,26 @@ import (
"github.com/percona/percona-server-mongodb-operator/version"
)

// reconcilePhysicalRestore performs a physical restore of a Percona Server for MongoDB from a backup.
// The function:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this comment? Primarily this part of how the method does what it's supposed to do.

pkg/controller/perconaservermongodbrestore/physical.go Outdated Show resolved Hide resolved

/opt/percona/pbm-agent 2> ${log} &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
/opt/percona/pbm-agent 2> ${log} &
/opt/percona/pbm-agent 2>${log} &

/opt/percona/ps-entry.sh "$@"

echo "Physical restore in progress"

cat ${log}
sleep infinity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
sleep infinity
sleep infinity

inelpandzic
inelpandzic previously approved these changes Sep 5, 2023
Copy link
Contributor

@inelpandzic inelpandzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks OK to me.

inelpandzic
inelpandzic previously approved these changes Sep 8, 2023
pooknull
pooknull previously approved these changes Sep 8, 2023
e2e-tests/functions Outdated Show resolved Hide resolved
@egegunes egegunes dismissed stale reviews from pooknull and inelpandzic via 1eab7ad September 8, 2023 13:15
@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
cross-site-sharded passed
data-at-rest-encryption passed
data-sharded passed
demand-backup passed
demand-backup-eks-credentials passed
demand-backup-physical passed
demand-backup-physical-sharded passed
demand-backup-sharded passed
expose-sharded passed
ignore-labels-annotations passed
init-deploy passed
finalizer passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
multi-cluster-service passed
non-voting passed
one-pod passed
operator-self-healing-chaos passed
pitr passed
pitr-sharded passed
pitr-physical passed
recover-no-primary passed
rs-shard-migration passed
scaling passed
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
storage passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded passed
upgrade-sharded passed
users passed
version-service passed
We run 42 out of 42

commit: 1eab7ad
image: perconalab/percona-server-mongodb-operator:PR-1288-1eab7add

@hors hors self-requested a review September 8, 2023 18:07
@hors hors merged commit e0bced5 into main Sep 8, 2023
10 checks passed
@hors hors deleted the K8SPSMDB-926 branch September 8, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL 1000+ lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants