Bug 1957877

Summary: Restarted warm migration should behave like a new migration
Product: Migration Toolkit for Virtualization Reporter: Nandini Chandra <nachandr>
Component: GeneralAssignee: Sam Lucidi <slucidi>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: medium    
Version: 2.0.0CC: apinnick, fdupont, istein, slucidi
Target Milestone: ---   
Target Release: 2.0.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-06-10 17:11:47 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 Nandini Chandra 2021-05-06 17:12:20 UTC
Description of problem:
------------------------
When a canceled warm migration is restarted, the migration picks up from where it left off during the canceled run.
Supposing 3 precopies had been created in the canceled run, upon restarting the warm migration, the UI lists 3 precopies and it also shows that the 4th precopy is in progress.

The restart run should be treated like a fresh warm migration run and the precopies should start at 1 instead of getting added to the list of precopies from the canceled run.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
MTV 2.0.0-4


How reproducible:
-----------------
Always


Steps to Reproduce:
-------------------
1.Start a warm migration
2.Cancel the warm migration after a few precopies have been created(Supposing 3 precopies are created, the UI lists 3 precopies at this point)
3.Restart the warm migration
The UI now lists the 3 precopies from the canceled run and also shows that the 4th precopy is in progress.


Actual results:
---------------


Expected results:
-----------------


Additional info:
----------------
I restarted a canceled warm migration plan and examined the Plan CR.The Plan CR shows precopies from previous canceled runs. This information should get reset between canceled and restarted runs so that precopies start at 1 rather than being added to the list of precopies from the canceled runs.

[nachandr]$ oc describe plan warm-migration-cancel
      Started:        2021-05-06T16:44:45Z
      Warm:
        Consecutive Failures:  0
        Failures:              0
        Next Precopy At:       2021-05-06T17:45:57Z
        Precopies:
          End:          2021-05-06T16:09:07Z   <----canceled run#1
          Start:        2021-05-06T16:08:10Z
          End:          2021-05-06T16:39:36Z   <----canceled run#2
          Start:        2021-05-06T16:38:17Z
          End:          2021-05-06T16:46:20Z   <----current run
          Start:        2021-05-06T16:45:08Z

Comment 2 Fabien Dupont 2021-05-08 21:28:31 UTC
The fix is in build 2.0.0-12 / iib:73572.

Comment 3 Nandini Chandra 2021-05-10 17:41:19 UTC
Verified on MTV 2.0.0-12

Comment 6 errata-xmlrpc 2021-06-10 17:11:47 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 (MTV 2.0.0 images), 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/RHEA-2021:2381