percona-xtradb-cluster-operator icon indicating copy to clipboard operation
percona-xtradb-cluster-operator copied to clipboard

PVC: forward dataSource field

Open ebuildy opened this issue 1 year ago • 2 comments

CHANGE DESCRIPTION

Problem: Short explanation of the problem.

I want to clone PVC from a VolumeSnapshot (containing a xtrabackup).

Cause: Short explanation of the root cause of the issue if applicable.

Can be useful to be able to clone PVC from other PVC or VolumeSnapshot.

Solution: Short explanation of the solution we are providing with this PR.

CRD define dataSource, dataSourceRef fields, this PR implement it.

As a workaround, I must create the PVC manually before deploying the pxc-cluster, which is not very handy.

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?
  • [ ] 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 PXC version?
  • [ ] Does the change support oldest and newest supported Kubernetes version?

ebuildy avatar Feb 09 '24 22:02 ebuildy

CLA assistant check
All committers have signed the CLA.

it-percona-cla avatar Feb 09 '24 22:02 it-percona-cla

@ebuildy thank you for the contribution. I need to test this.

egegunes avatar Mar 01 '24 09:03 egegunes

@inelpandzic if you have time please test this PR, I couldn't find the time to do it.

in most basic way you can do the following: create a cluster cluster1, write some data, delete cluster without deleting secrets or PVCs and create cluster cluster2 using datadir-cluster1-pxc-0 as DataSource (don't forget to use the same credentials from cluster1) and check if the data is in cluster2.

egegunes avatar Mar 14 '24 10:03 egegunes

@ebuildy @egegunes I have tested this and works as expected. I think this is good.

inelpandzic avatar Mar 15 '24 08:03 inelpandzic

Test name Status
affinity-8-0 passed
auto-tuning-8-0 passed
cross-site-8-0 passed
demand-backup-cloud-8-0 passed
demand-backup-encrypted-with-tls-8-0 passed
demand-backup-8-0 passed
haproxy-5-7 passed
haproxy-8-0 passed
init-deploy-5-7 passed
init-deploy-8-0 passed
limits-8-0 passed
monitoring-2-0-8-0 passed
one-pod-5-7 passed
one-pod-8-0 passed
pitr-8-0 passed
pitr-gap-errors-8-0 passed
proxy-protocol-8-0 passed
proxysql-sidecar-res-limits-8-0 passed
pvc-resize-5-7 passed
pvc-resize-8-0 passed
recreate-8-0 passed
restore-to-encrypted-cluster-8-0 passed
scaling-proxysql-8-0 passed
scaling-8-0 passed
scheduled-backup-5-7 passed
scheduled-backup-8-0 passed
security-context-8-0 passed
smart-update1-8-0 passed
smart-update2-8-0 passed
storage-8-0 passed
tls-issue-cert-manager-ref-8-0 passed
tls-issue-cert-manager-8-0 passed
tls-issue-self-8-0 passed
upgrade-consistency-8-0 passed
upgrade-haproxy-5-7 passed
upgrade-haproxy-8-0 passed
upgrade-proxysql-5-7 passed
upgrade-proxysql-8-0 passed
users-5-7 passed
users-8-0 passed
validation-hook-8-0 passed
We run 41 out of 41

commit: https://github.com/percona/percona-xtradb-cluster-operator/pull/1624/commits/2c1344c00d4492e24ea9f4fdd87c60422663cad2 image: perconalab/percona-xtradb-cluster-operator:PR-1624-2c1344c0

JNKPercona avatar Mar 28 '24 13:03 JNKPercona

I don't know why CLA check is pending, @hors please merge when you have the chance.

egegunes avatar Mar 29 '24 07:03 egegunes

I don't know why CLA check is pending, @hors please merge when you have the chance.

when clicking on CLA check:

Capture d’écran, le 2024-03-29 à 11 37 24

ebuildy avatar Mar 29 '24 15:03 ebuildy

@ebuildy I have merged this PR. Thank you for contribution.

hors avatar Apr 02 '24 14:04 hors