Bug 1795343

Summary: Migration Controller does not wait for stage pods to finish terminating before starting restore
Product: OpenShift Container Platform Reporter: Dylan Murray <dymurray>
Component: Migration ToolingAssignee: Sam Lucidi <slucidi>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: slucidi, sregidor
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-28 11:09:55 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 Dylan Murray 2020-01-27 18:02:28 UTC
Description of problem:
https://github.com/fusor/mig-controller/issues/409

Depending on the access mode of the volumes, it's possible for the restore to fail if a stage pod is still terminating at restore time because the volume will have a lock on it. To fix this, the controller should be waiting for all stage pods to finish terminating before running the restore.

Version-Release number of selected component (if applicable):
4.2.0

How reproducible:
70%? Hard to say since it's a race condition, but with specific volumes it's more reproducible than others.

Steps to Reproduce:
1. Run a migration with RWO volumes

Actual results:
Final restore fails due to being unable to mount the volume

Expected results:
Restore succeeds and restore doesn't run until stage pods are finished terminating.

Additional info:

Comment 5 Sergio 2020-05-08 11:55:30 UTC
Verified using CAM 1.2 stage

Once the stage pods are created, there is a phase to wait for the stage pods to finish before restoring. And the execution is blocked there until stage pods are removed (after "Terminating" status)

      message: 'Step: 19/31'
      reason: StageRestoreCreated

      message: 'Step: 21/31'
      reason: EnsureStagePodsTerminated
      status: "True"

      message: 'Step: 27/31'
      reason: FinalRestoreCreated
      status: "True"

Comment 7 errata-xmlrpc 2020-05-28 11:09:55 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, 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-2020:2326