Bug 2095221

Summary: "migration finalized successfully" in target virt launcher pod before the VM migration completion
Product: Container Native Virtualization (CNV) Reporter: nijin ashok <nashok>
Component: VirtualizationAssignee: Jed Lejosne <jlejosne>
Status: ON_QA --- QA Contact: Denys Shchedrivyi <dshchedr>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10.0CC: acardace
Target Milestone: ---   
Target Release: 4.14.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 nijin ashok 2022-06-09 10:32:45 UTC
Description of problem:

In virt-launcher target pod below message is logged before the migration completion.

~~~
{"component":"virt-launcher","kind":"","level":"info","msg":"migration finalized successfully","name":"rhel8-organisational-pony","namespace":"nijin-cnv","pos":"server.go:329","timestamp":"2022-03-15T07:16:12.784845Z","uid":"31323a86-8f9d-425b-aec9-5ac514e8279d"}
~~~

This is from `FinalizeVirtualMachineMigration` which is called from here https://github.com/kubevirt/kubevirt/blob/5bf9394089f6790279aad9ac2001a7a230d34ec3/pkg/virt-handler/vm.go#L681.

This is an early stage of VM migration where the libvirt domain gets detected on the target pod. The actual "libvirt" migration starts after this (movement of memory) and even if this fails, we still see the above message. With the above message, users get an impression that the migration is completed although it's not.

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

4.10


How reproducible:

100%

Steps to Reproduce:
1. Live migrate a virtual machine and watch the target virt-launcher pod for the above messages. We can see that this message is logged in the early stage of migration. 


Actual results:

"migration finalized successfully" in the target virt launcher pod before the VM migration completion

Expected results:


Additional info:

Comment 1 sgott 2022-06-10 16:54:07 UTC
Nijin, can you confirm that this is a misleading status only? The migration completes successfully?

Comment 2 nijin ashok 2022-06-13 08:58:44 UTC
(In reply to sgott from comment #1)
> Nijin, can you confirm that this is a misleading status only? The migration
> completes successfully?

Yes, this is only a misleading status. We will see this message in the target pod even for failed migration.

Comment 3 sgott 2022-06-13 21:13:07 UTC
Scheduling this BZ for the next release due to priority and capacity.

Comment 4 Kedar Bidarkar 2022-09-14 12:41:33 UTC
Moving this to 4.13,considering the severity of this bug and capacity of the team.

Comment 6 Antonio Cardace 2023-03-01 09:24:42 UTC
Moving back to ASSIGNED as the PR that fixed this got reverted https://github.com/kubevirt/kubevirt/pull/9187.

Comment 7 Kedar Bidarkar 2023-03-01 09:38:18 UTC
As per comment 6 and comment 2, the PR was raised, got reverted and as this is also just a misleading status, we planning this 4.14.

Comment 8 Jed Lejosne 2023-07-14 13:09:31 UTC
Fixed as part of https://github.com/kubevirt/kubevirt/pull/9757