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:
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.
(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?
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 ?
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
Hi Yaacov, UI 4.5.x -> browsing to workloads -> vitrual machines -> no VM is present. Where is the VMI displayed?
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 ?
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.
Created bug 1874480 for common templates
Is a foregroundDeletion finalizer handled by virt-operator? If not, we are left with explicit foreground deletion in the UI.
verified on master, it shows a 'deleting' state if it takes a bit long time to delete the VMI.
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