Bug 2010908

Summary: [MTV] VM remains in printableStatus: Provisioning in cold migration
Product: Container Native Virtualization (CNV) Reporter: Amos Mastbaum <amastbau>
Component: StorageAssignee: Michael Henriksen <mhenriks>
Status: CLOSED ERRATA QA Contact: Maayan Hadasi <mguetta>
Severity: high Docs Contact:
Priority: high    
Version: 4.9.0CC: alitke, cnv-qe-bugs, istein, mguetta, mhenriks, mrashish, ngavrilo, pelauter, pvauter, yadu
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.10.0-651 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-16 15:56:11 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:
Attachments:
Description Flags
vm none

Description Amos Mastbaum 2021-10-05 15:36:41 UTC
Created attachment 1829501 [details]
vm

Created attachment 1829501 [details]
vm

Description of problem:

After a Plan is successfully completed the VM printableStatus: remains in Provisioning



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


How reproducible:
100% RHV and vmware


Steps to Reproduce:
1. Run A cold migration of source RHV or VMWare VM that is TURNED OFF
2.
3.

Actual results:
printableStatus: remains in Provisioning 

Expected results:
The VM should be Ready

Additional info:
1. Turning the VM on and off corrects this
2. This a regression in 2.2 (2.1 (with vmio) against the same CNV builds doesn't have this issue)

Comment 5 Fabien Dupont 2021-10-06 12:32:06 UTC
Kubevirt determines the printable status here: https://github.com/kubevirt/kubevirt/blob/e56d0a18679033ab7d42aa903f3286b613dbf216/pkg/virt-controller/watch/vm.go#L16772.

In this case it's using the status of the DataVolumes and PVCs to set the Provisioning status.

It looks like it shouldn't have the Provisioning status when the DVs have both been successfully imported, but worth asking what the Kubevirt team intended.

Comment 9 Sam Lucidi 2021-10-29 19:45:26 UTC
It appears that Kubevirt does not notice when the DataVolumes have completed transferring, so the printableStatus of the VM remains at "provisioning" until the VM is reconciled again. Moving to CNV.

Comment 10 sgott 2021-11-01 15:12:03 UTC
Re-assignign this BZ to the storage component as it appears to be about handling the VM's status as related to DVs/PVCs. Please feel free to re-assign if you think this was in error.

Comment 11 Natalie Gavrielov 2021-11-03 11:30:25 UTC
It looks like the provisioning finished successfully, but kubevirt doesn't update the printable status for some reason.
The next step is to reproduce it and run: 
oc adm inspect ns/openshift-cnv
We should look at the kubevirt controller logs

Comment 12 Amos Mastbaum 2021-11-03 14:21:22 UTC
Created attachment 1839609 [details]
inspect

Comment 13 Amos Mastbaum 2021-11-03 14:24:49 UTC
(In reply to Natalie Gavrielov from comment #11)
> It looks like the provisioning finished successfully, but kubevirt doesn't
> update the printable status for some reason.
> The next step is to reproduce it and run: 
> oc adm inspect ns/openshift-cnv
> We should look at the kubevirt controller logs 

attached (wasn't sure which logs is needed, attached everything)

Comment 14 Yan Du 2022-01-19 13:29:15 UTC
Michael, Could you please take a look ?

Comment 15 Adam Litke 2022-01-31 14:56:17 UTC
Peter, this breaks VM import so I think we should approve it as a blocker.

Comment 16 Ilanit Stein 2022-02-16 10:51:46 UTC
Verified on OCP-4.10.0-fc.2 /CNV-4.10.0-674
When MTV a RHEL8 VM cold migration ended successfully the final status seen in OCP web UI Virtualization page for the imported VM is "Stopped",
as expected.

Comment 19 errata-xmlrpc 2022-03-16 15:56:11 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 (Moderate: OpenShift Virtualization 4.10.0 Images security and bug fix update), 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/RHSA-2022:0947