Bug 2012795

Summary: Allow editing a plan if no VM has successfully been migrated.
Product: Migration Toolkit for Virtualization Reporter: Fabien Dupont <fdupont>
Component: User ExperienceAssignee: Jeff Ortel <jortel>
Status: CLOSED MIGRATED QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: unspecified    
Version: 2.2.0CC: ahadas, mturley, slucidi
Target Milestone: ---   
Target Release: 2.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: 2023-10-15 19:57:07 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 Fabien Dupont 2021-10-11 10:31:48 UTC
Description of problem:

There are cases where a plan should be editable even after it was started once:

1. The Plan has failed and the failure is caused by the network/storage mapping. Users should be able to fix the mapping. 

2. The plan was cancelled since users wanted to change a parameter of the plan.

The common criteria is that no individual VM migration succeeded. In that situation, it would be safe to allow editing the plan.

This is a follow-up of https://bugzilla.redhat.com/show_bug.cgi?id=1951660.

Comment 1 Sam Lucidi 2021-10-12 18:48:20 UTC
Plans are already editable. Editing a plan while a migration is running will cause it to be canceled, but the user can change the plan at will.

Comment 2 Mike Turley 2021-10-19 19:03:03 UTC
Plans are editable in the API, sure, but not in the UI because we were concerned about assumptions the UI makes when displaying status data if we give it a plan that now has old status data that doesn't match its new spec. @slucidi when you edit a plan does it clear the status property or will that still have details from the last migration?

Comment 3 Sam Lucidi 2021-12-16 17:23:11 UTC
The status will remain until a new migration is started. Once the new migration is started, the previous status information will be added to the history field and the vms field will be reset.
It's essentially the same flow as if you had canceled the migration. (and that's how it is implemented: if you are running a migration and change the plan, the running migration is canceled)

Comment 4 Mike Turley 2022-01-13 19:51:37 UTC
Moving to 2.4 due to risk of regressions described above.