Bug 1914418

Summary: Resources excluded from stage backup if they have prior stage labels
Product: Migration Toolkit for Containers Reporter: Scott Seago <sseago>
Component: ControllerAssignee: Jaydip Gabani <jgabani>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: unspecified Docs Contact: Avital Pinnick <apinnick>
Priority: urgent    
Version: 1.4.0CC: ernelson, rjohnson, sregidor
Target Milestone: ---   
Target Release: 1.4.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: 2021-02-11 12:55:27 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 Scott Seago 2021-01-08 19:13:16 UTC
Description of problem:
If a resource needed for stage backup has a migration-included-stage-backup pointing to a prior migration, then it won't be labeled for the current migration. If it's on a PV, the associated PVC will also be skipped.

Version-Release number of selected component (if applicable): master and release-1.4.0 branches


How reproducible:
always

Steps to Reproduce:
1. create a migplan to migrate a namespace with at least one PV
2. use indirect migration (for copy) or configure the volume for move
3. set a 'migration-included-stage-backup' label on the PV (value can be anything as long as it's *not* the value of the migmigration)
4. Run a migration

Actual results:
PV not migrated

Expected results:
PV migrated

Additional info:

Comment 1 Jaydip Gabani 2021-01-11 14:28:45 UTC
The pr https://github.com/konveyor/mig-controller/pull/880 fixes this issue.

Comment 5 Sergio 2021-01-22 16:29:41 UTC
Verified using MTC 1.4.0 (AWS 3.11 gp2 -> 4.7 gp2 - AWS S3)

openshift-migration-rhel7-operator@sha256:41d653c7fea749cb6add3aadb5716b9a443ab83adef88504915177bbc5aa0fda
    - name: MIG_CONTROLLER_REPO
      value: openshift-migration-controller-rhel8@sha256
    - name: MIG_CONTROLLER_TAG
      value: 94b2886c52a97b39b6643cca5af7948a90be8a89f5110d596be117f34d54abff


Migrating this PVC (source cluster):

$ oc get pvc --show-labels
NAME         STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE       LABELS
postgresql   Bound     pvc-53dbcf44-5ca9-11eb-a972-0ebbd04cb535   1Gi        RWO            gp2            4h        app=django-psql-persistent,migration-included-stage-backup=fake,template=django-psql-persistent



We get this result:

target cluster
$ oc get pvc --show-labels
NAME         STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE     LABELS
postgresql   Bound    pvc-e93f93ab-8160-45ae-9c67-b58670b11276   1Gi        RWO            gp2            2m41s   app=django-psql-persistent,migration.openshift.io/migrated-by-migmigration=e3d162d8-dc71-4b42-90e8-e30fbddda360,migration.openshift.io/migrated-by-migplan=22cc6301-8c36-40ea-abd9-4dcb6f3c9b95,template=django-psql-persistent,velero.io/backup-name=134ee240-5ccd-11eb-9b63-6df9c649f445-whfcf,velero.io/restore-name=134ee240-5ccd-11eb-9b63-6df9c649f445-wfxpf


source cluster
$ oc get pvc --show-labels
NAME         STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE       LABELS
postgresql   Bound     pvc-53dbcf44-5ca9-11eb-a972-0ebbd04cb535   1Gi        RWO            gp2            4h        app=django-psql-persistent,template=django-psql-persistent


The label is removed from the source and the target cluster too.


Moved to VERIFIED status.

Comment 7 errata-xmlrpc 2021-02-11 12:55:27 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.4.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:5329