Bug 1997705

Summary: Stopped Virtual Machine initial printableStatus should be 'stopped'
Product: Container Native Virtualization (CNV) Reporter: Ruth Netser <rnetser>
Component: VirtualizationAssignee: Igor Bezukh <ibezukh>
Status: ASSIGNED --- QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.14.0CC: cnv-qe-bugs, jpeimer, kbidarka, sgott, vsibirsk
Target Milestone: ---Keywords: Reopened
Target Release: 4.15.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: 2022-09-09 15:47: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 Ruth Netser 2021-08-25 16:26:06 UTC
Description of problem:
When a VM is created, as long as it is not running, its initial printableStatus is None. 
It should be 'stopped' (the same value when a running VM is stopped).


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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM (with running: False)
printableStatus is None
2. Start the VM

Actual results:
printableStatus is changed to 'Stopped' and then to 'Starting'


Expected results:
initial value of printableStatus for a non-running VM should be 'Stopped'

Additional info:

virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   1s                 
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   1s                 
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   1s                 
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   1s      Stopped    False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   2s      Stopped    False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   2s      Stopped    False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   2s      Starting   False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   3s      Starting   False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   3s      Starting   False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   15s     Running    False
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   15s     Running    True
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   2m13s   Running    True
virt-vm-lifecycle-test-restart   vm-to-restart-1629908063-2791414   2m13s   Stopping   True

Comment 2 Igor Bezukh 2022-05-15 12:08:09 UTC
Hi,

I was trying to reproduce it on CNV 4.11 but without success. Can you please provide the VM manifest you were using for reproduction?

TIA
Igor

Comment 3 sgott 2022-06-03 15:27:11 UTC
Ruth, this appears to be fixed in the current release. Are you able to reproduce it on 4.11?

Comment 4 Ruth Netser 2022-06-08 16:46:13 UTC
@kbidarka Can you please check? The issue was observed when creating a VM from template (which consumes a golden image DV)

Comment 5 sgott 2022-09-09 15:47:07 UTC
We are unable to reproduce this issue. Please feel to re-open this BZ if this is still a problem.

Comment 6 vsibirsk 2023-08-15 14:00:16 UTC
Was able to reproduce it on 4.13 and 4.14 with simple container disk fedora

$ oc get vm -A -w
NAMESPACE                             NAME                                  AGE   STATUS   READY
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   0s    Stopped   False
virt-general-test-container-disk-vm   container-disk-vm-1692107073-600778   1s    Stopped   False

$ oc get vm -A -w
NAMESPACE                             NAME                                   AGE   STATUS   READY
virt-general-test-container-disk-vm   container-disk-vm-1692107314-6578658   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107314-6578658   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107314-6578658   0s             
virt-general-test-container-disk-vm   container-disk-vm-1692107314-6578658   1s             
virt-general-test-container-disk-vm   container-disk-vm-1692107314-6578658   1s    Stopped   False

takes up to 1 sec for vm to get printable status

Comment 7 Kedar Bidarkar 2023-08-16 12:18:19 UTC
Targeting this to CNV 4.15 due to severity and priority of this bug.