Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-56570

VMCannotBeEvicted incorrectly triggered for scheduling VMs

XMLWordPrintable

    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • ---
    • ---
    • Moderate
    • None

      Description of problem:

      The "LiveMigratable" condition on  the VMI is not populated during the scheduling phase of the virtual machine. If the VM is stuck in scheduling phase or if it takes more than a minute for the VM to move from Scheduling to  Running, then the alert VMCannotBeEvicted is triggered since it get as an empty value for "LiveMigratable" condition.

      VMI is in scheduling phase:

      oc get vmi rhel9-silver-perch-55
      NAME                    AGE   PHASE        IP    NODENAME   READY
      rhel9-silver-perch-55   21m   Scheduling                    False

      The virtual machine is added to "kubevirt_vmi_non_evictable":

      $ oc exec virt-controller-6f88ff5dd9-t6chn -- curl -k https://127.0.0.1:8443/metrics 2>/dev/null |grep -i "rhel9-silver-perch-55"|egrep "kubevirt_vmi_info|evict"
      
      kubevirt_vmi_info{flavor="small",guest_os_kernel_release="",guest_os_machine="",guest_os_name="",guest_os_version_id="",instance_type="<none>",name="rhel9-silver-perch-55",namespace="nijin-cnv",node="",os="rhel9",phase="scheduling",preference="<none>",workload="server"} 1
      
      kubevirt_vmi_non_evictable{name="rhel9-silver-perch-55",namespace="nijin-cnv",node=""} 1

      And cluster is getting the following alert (notice the empty string in node name):

      Eviction policy for VirtualMachine rhel9-silver-perch-55 in namespace Namespace NS nijin-cnv (on node ) is set to Live Migration but the VM is not migratable

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

      OpenShift Virtualization  4.17.4

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a VM and put an invalid node selector so that the VM will be stuck in scheduling phase.
      2. Wait for a minute and look for the alert  for VMCannotBeEvicted 
      

      Actual results:

      VMCannotBeEvicted incorrectly triggered for scheduling VMs

      Expected results:

      Since the VM is not running yet and is not scheduled, OpenShift Virtualization shouldn't trigger the alert VMCannotBeEvicted

      Additional info:

       

              kmajcher@redhat.com Krzysztof Majcher
              rhn-support-nashok Nijin Ashok
              Krzysztof Majcher Krzysztof Majcher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: