Bug 1858777

Summary: Alert for VM with 'evictionStrategy: LiveMigrate' for local PVs set
Product: Container Native Virtualization (CNV) Reporter: Ruth Netser <rnetser>
Component: VirtualizationAssignee: sgott
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.4.0CC: cnv-qe-bugs, kbidarka, sgott
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-operator-container-v4.9.0-25 hco-bundle-registry-container-v4.9.0-89 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1964954 (view as bug list) Environment:
Last Closed: 2021-11-02 15:57:26 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 2020-07-20 11:46:09 UTC
Description of problem:
If a VM is using local PV and its evictionStrategy: LiveMigrate, OCP upgrade would result with nodes in "Ready,SchedulingDisable" state.
As a VM with local PVs and evictionStrategy: LiveMigrate is not a supported use case at the moment, such VMs should be blocked from running.


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

Comment 1 Israel Pinto 2020-07-21 12:01:09 UTC
Doc BZ for 2.4: https://bugzilla.redhat.com/show_bug.cgi?id=1859129

Comment 2 Ruth Netser 2020-08-02 08:35:00 UTC
The same block logic should also be applied to VMs with pass-through features such as SRIOV and GPU

Comment 3 Jed Lejosne 2020-08-05 15:42:24 UTC
I addressed both SRIOV and GPUs there: https://github.com/kubevirt/kubevirt/pull/3944
Local PVs is more complicated, since we don't know at VMI creation if PVs are local or not.

Comment 4 Kedar Bidarkar 2020-08-19 12:28:39 UTC
Further design work needs to be done for this bug and so we plan to move it to future for now.

Comment 6 Kedar Bidarkar 2021-08-30 20:20:55 UTC
name: VMCannotBeEvicted
expr: kubevirt_vmi_non_evictable > 0
for: 1m
labels:
severity: warning
annotations:
description: Eviction policy for {{ $labels.name }} (on node {{ $labels.node }}) is set to Live Migration but the VM is not migratable
summary: The VM's eviction strategy is set to Live Migration but the VM is not migratable

---

Created a VM with HostPathProvisioner as the StorageClass.

Accessed the Prometheus URL and we see the above alert "VMCannotBeEvicted"

VERIFIED with virt-operator/images/v4.9.0-35

Comment 9 errata-xmlrpc 2021-11-02 15:57:26 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.9.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-2021:4104