Created attachment 1521072 [details] automation.log Description of problem: =========================== Cancel migration do not stop creating volume, instance and network port on OSP Version-Release: =========================== CFME - 5.10.0.31.20190108221820_a0968c8 OSP - 14 (qe's baremetal) Conversion appliance - rhosp-v2v-appliance-14.0-20181214.1 How reproducible: =========================== 100% Steps to Reproduce: =========================== 1. Migrate vm and cancel in between (I did at ~28.47%) Actual results: =========================== CFME UI shows like it is canceled (gives fa fa-ban icon and bars stops on same %) but if you check virt-v2v wrapper log on conversion you will find migration still is in progress. Found process runs till it finishes the migration, it creates volume, instance and port in OSP. Expected results: =========================== Should stop migration on cancel trigger point itself. Additional info: =========================== Found failed migration behaves differently in this case, it clears things created by process after migration failure.
Created attachment 1521075 [details] cfme_plan_details.png
I could reproduce the issue and from what I've seen, it should not work on RHV neither. Have you tested it ?
https://github.com/ManageIQ/manageiq/pull/18372
Tested usecase with RHV and it does reproduce on 5.10.0.32. This issue is not on 5.9.7.2 though, since problematic code does not exists on build. Thanks @fabien for confirmation.
*** Bug 1668662 has been marked as a duplicate of this bug. ***
Appliance is available for debugging.. > Appliance : https://10.8.196.172/ > Plan : plan_BQypPt46jh Thanks Shveta - Sudhir
Moving this to 5.10.5 after consulting with Fabien
Please, try to reproduce when 5.10.5 build #1 is available.
I checked the appliance logs and I found this: evm.log:[----] W, [2019-05-31T05:24:32.862141 #16315:89ecd18] WARN -- : MIQ(ServiceTemplateTransformationPlanTask#kill_virtv2v) Could not find PID for task using virtv2v wrapper: {"wrapper_log"=>"/var/log/vdsm/import/v2v-import-20190531T051849-33892-wrapper.log", "v2v_log"=>"/var/log/vdsm/import/v2v-import-20190531T051849-33892.log", "state_file"=>"/tmp/v2v-import-20190531T051849-33892.state", "throttling_file"=>"/tmp/v2v-import-20190531T051849-33892.throttle"} evm.log:[----] W, [2019-05-31T05:25:13.707227 #16307:7549974] WARN -- : MIQ(ServiceTemplateTransformationPlanTask#kill_virtv2v) Could not find PID for task using virtv2v wrapper: {"wrapper_log"=>"/var/log/vdsm/import/v2v-import-20190531T051849-33892-wrapper.log", "v2v_log"=>"/var/log/vdsm/import/v2v-import-20190531T051849-33892.log", "state_file"=>"/tmp/v2v-import-20190531T051849-33892.state", "throttling_file"=>"/tmp/v2v-import-20190531T051849-33892.throttle"} This looks to me that you are passing wrong structure to the kill function. The 'pid' is in the state file. (Thanks Daniel for the patch.)
When we cancel migration we should either take updated % from backend/logs and then update UI bars according to that. In other words, UI and backend both should show same % on which migration stopped. After cancelling migration in UI, let say on 30%, at backend it goes for 10-20% extra sometimes (may be processing delay) and then in backend it shows 50%. Now if you see backend/logs is totally correct (50%) but in UI it is incorrect (30%). One more reason we are thinking on this aspect is because this uncertain behavior is hard to automate, we should addressed this as well. Either we should stop backend quickly after migration got cancelled in UI (not sure how it is possible) or it should take % from backend and update it in UI as I mentioned.
*** Bug 1718678 has been marked as a duplicate of this bug. ***
https://github.com/ManageIQ/manageiq/pull/18853
Comment for QE: the fix only ensure that the virt-v2v process is killed. We noticed that the disk transfer is not cancelled in our lab, but it might be due to issues with the RHV environment. If you observe the same behavior in the QE lab, please open a new BZ as the cause and solution will be different.
Fixed . Working in 5.11.0.19.20190813184334_ed72c9f