Bug 1987044

Summary: [OCPV48] Shutoff VM is being shown as "Starting" in WebUI when using spec.runStrategy Manual/RerunOnFailure
Product: OpenShift Container Platform Reporter: Rafal Szmigiel <rszmigie>
Component: Console Kubevirt PluginAssignee: Aviv Turgeman <aturgema>
Status: CLOSED ERRATA QA Contact: Leon Kladnitsky <lkladnit>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, cnv-qe-bugs, gouyang, lkladnit, tnisan, ycui, yzamir
Target Milestone: ---Flags: lkladnit: needinfo-
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-12 04:36:27 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 Rafal Szmigiel 2021-07-28 19:26:41 UTC
Description of problem:
For test purposes I have switched from spec.running to spec.runStrategy, what enables me to leave the vM powered off if it has crashed or was shutoff gracefully by administrator (please see: https://docs.openshift.com/container-platform/4.8/virt/virtual_machines/virt-create-vms.html#virt-about-runstrategies-vms_virt-create-vms for more details).

If I shutoff the VM, VMI is being left in "Success" phase. This makes WebUI show the VM as "Starting" what is pretty misleading as this VM won’t be started until VMI will be deleted and VM started manually.

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

How reproducible:
All time

Steps to Reproduce:
1. Create VM
2. Use spec.runStrategy: Manual or RerunOnFailure
3. Shutdown VM gracefully from inside (shutdown -P now for an instance)
4. Observe VMI stays in "Succeeded" phase and WebUI shows VM as "Starting".

Actual results:
Shutoff VM is shown as "Starting" in WebUI.

Expected results:
VM should be shown as "Off", there should be also information that user should delete VMI before VM could be started again.

Additional info:

Comment 2 Guohua Ouyang 2021-11-02 03:48:54 UTC
It only happens with spec.runStrategy: Manual, not happen with spec.runStrategy: RerunOnFailure when shutdown the VM inside.

BTW, follow the doc by using virtctl to start/stop/restart the VM with "spec.runStrategy: Manual" has no this issue.
Manual
  The start, stop, and restart virtctl client commands can be used to control the VMI’s state and existence.

Comment 3 Leon Kladnitsky 2021-12-25 08:37:28 UTC
Verified on
Client Version: 4.9.0-0.nightly-2021-07-20-125820
Server Version: 4.9.11

Comment 4 Guohua Ouyang 2021-12-27 03:40:15 UTC
There isn't a fix for the bug yet, how did you verify this bug?

Comment 7 Leon Kladnitsky 2022-01-10 11:21:36 UTC
Verified on master/4.10.0-0.nightly-2022-01-04-214702.
The VM restarts, the status label changes accordingly.

Comment 10 errata-xmlrpc 2022-03-12 04:36:27 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 Container Platform 4.10.3 security 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:0056