Bug 1874635

Summary: PV migration with snapshots is broken when we do stage migrations
Product: OpenShift Container Platform Reporter: Erik Nelson <ernelson>
Component: Migration ToolingAssignee: Scott Seago <sseago>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: jmatthew, mberube, rjohnson, sregidor, sseago
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 18:42:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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. ***