Bug 1874635 - PV migration with snapshots is broken when we do stage migrations
Summary: PV migration with snapshots is broken when we do stage migrations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.5.0
Assignee: Scott Seago
QA Contact: Xin jiang
URL:
Whiteboard:
: 1825259 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-01 19:38 UTC by Erik Nelson
Modified: 2021-01-05 20:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-30 18:42:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4148 0 None None None 2020-09-30 18:42:59 UTC

Description Erik Nelson 2020-09-01 19:38:56 UTC
From: https://github.com/konveyor/mig-controller/issues/653

While Snapshot creation is incremental, snapshot restore is not. This means that when there are multiple stage migrations and a final migration, each stage backup creates an incremental snapshot based on the previous snapshot. However, snapshot restore always creates a new volume from a given snapshot. The first stage backup restores the first snapshot to the destination cluster. Subsequent stage migrations (and the final migration) take the incremental snapshot, but the restore gets discarded by velero since the PV and PVC already exist in the destination cluster.

Instead, we need to continue to do snapshot backups of PVs as we currently do for the backup phase, but on the restore phase, stage restores for stage migrations should discard snapshot PV/PVCs, while stage restores for final migrations should restore the snapshot PV/PVCs.

On the controller side we need to revisit our stage vs. final restore, stage vs. final migration annotations (so we can distinguish between "stage restore of final migration" and "stage restore of stage migration" in the velero plugin. The rest of the work would be on the plugin side to discard PVs and PVCs in certain cases based on these annotations.

Comment 4 Sergio 2020-09-22 09:19:35 UTC
Verified using MTC 1.3


openshift-migration-controller-rhel8@sha256:f6fba35a81988803cef414cead56e35c70463a09de2e5bbe11d7eac377de4e49


We followed this process to validate it:

add data -> stage -> add more data -> stage - > migrate
add data -> stage -> remove some data -> stage -> migrate



No volumes created in stage phases. Final data was OK in the target cluster after the migration.

Moved to VERIFIED status.

Comment 8 errata-xmlrpc 2020-09-30 18:42:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Migration Toolkit for Containers (MTC) Tool image release advisory 1.3.0), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4148

Comment 9 Erik Nelson 2021-01-05 20:54:05 UTC
*** Bug 1825259 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.