Bug 1873402 - [RFE] Deletion of running VM - VMI may be deleted long after the VM; the VM should be present in the UI until the VMI is deleted
Summary: [RFE] Deletion of running VM - VMI may be deleted long after the VM; the VM s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.2.z
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 4.6.0
Assignee: Yaacov Zamir
QA Contact: Guohua Ouyang
URL:
Whiteboard: ux_issue
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-28 07:53 UTC by Ruth Netser
Modified: 2020-10-27 16:35 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:35:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6565 0 None closed Bug 1873402: Add deleting status 2020-10-12 13:37:37 UTC
Red Hat Bugzilla 1874480 0 unspecified CLOSED [Common templates] Deletion of running VM - VMI may be deleted long after the VM; foregroundDeletion should be added to ... 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:35:51 UTC

Internal Links: 1874480

Description Ruth Netser 2020-08-28 07:53:44 UTC
Description of problem:
With the updated templates; terminationGracePeriod is 180 for Linux-based OS and 3600 for Windows.
When a running VM is deleted, it may take up to terminationGracePeriod for the VMI to be deleted. In that period of time the VM is removed from the UI and there's no indication for the user that the VMI is still running.
Switching blocking-VM-deletion-behaviour to foregroundDelete will keep the VM as long as the VMI still exists.

Version-Release number of selected component (if applicable):
OCP 4.5.6, CNV 2.4.1

How reproducible:
100% is the VMI is not imediately removed as well (VMI deletion duration may vary)

Steps to Reproduce:
1. Create Windows VM
2. Start the VM
3. Delete the VM

Actual results:
VM is not available in the UI.

Expected results:
VM should exist until the VMI is also removed.

Additional info:

Comment 1 Roman Mohr 2020-08-28 08:25:08 UTC
We can explore two options here:

 1) Do an explicit foreground delete in the UI.
 2) Check if we can/should add the "foregroundDeletion" finalizer on the common templates.

Comment 2 Tomas Jelinek 2020-08-31 07:33:13 UTC
(In reply to Roman Mohr from comment #1)
> We can explore two options here:
> 
>  1) Do an explicit foreground delete in the UI.

and we should also make sure we are checking that the VM is in this state and showing some meaningful status + disable all actions.

>  2) Check if we can/should add the "foregroundDeletion" finalizer on the
> common templates.

@Omer, WDYT?

Comment 3 Yaacov Zamir 2020-08-31 10:10:53 UTC
Ruth hi:

In 4.5.x The UI fall-back to show the VMI in case the VM is deleted and VMI is running.
What version of the UI are you using, can you reproduce in current UI ?

Comment 4 Yaacov Zamir 2020-09-01 05:10:21 UTC
Note:
a - Require back-end fix for not deleting VM before VMI is deleted.
b - UI fix depends on the way this is fixed on the backed.
c - Currently the UI show the VMI if the VM is deleted. 

Ref: 
comments https://bugzilla.redhat.com/show_bug.cgi?id=1873402#c2
https://bugzilla.redhat.com/show_bug.cgi?id=1873402#c1

Comment 5 Ruth Netser 2020-09-01 09:46:53 UTC
Hi Yaacov,
UI 4.5.x -> browsing to workloads ->  vitrual machines -> no VM is present.
Where is the VMI displayed?

Comment 6 Yaacov Zamir 2020-09-01 11:31:08 UTC
Note:
In https://bugzilla.redhat.com/show_bug.cgi?id=1803666 - we hide the VMIs that are in deleting phase.

@Tomas, help do we revert this behaviour and show VMIs that are in deleting state ?

Comment 7 Tomas Jelinek 2020-09-01 11:42:46 UTC
I dont think we should unfix the 1803666. I think what Roman meant in Comment 1 was to use this:
https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#setting-the-cascading-deletion-policy
e.g. more specifically this: -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}'
Which should keep the VM around until the VMI is deleted. But we will need to make sure to have a good status on the VM and to not to allow any actions on it in the meantime.

Comment 8 Ruth Netser 2020-09-01 13:12:45 UTC
Created bug 1874480 for common templates

Comment 9 Omer Yahud 2020-09-02 09:49:55 UTC
Is a foregroundDeletion finalizer handled by virt-operator?
If not, we are left with explicit foreground deletion in the UI.

Comment 12 Guohua Ouyang 2020-09-18 01:03:30 UTC
verified on master, it shows a 'deleting' state if it takes a bit long time to delete the VMI.

Comment 14 errata-xmlrpc 2020-10-27 16:35:35 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.