Description of problem: Version-Release number of selected component (if applicable): 2.4.0 How reproducible: Always Steps to Reproduce: Start a VM; Wait for a while Actual results: A critical PodDisruptionBuget alert shows up firing Expected results: Silence. Zero alerts. Additional info: Almost all VMs have an alert: $ oc get --no-headers vmis -A |grep Running|wc -l 19 $ oc get --no-headers pdb -A|grep kubevirt|wc -l 18
It happens because for every VMI that wants to be live migrated on eviction, we create a PDB that requires minimum of 2 unavailable pods for that VMI. 2 is to support the original pod and the target pod for the migration. The problem is, that until a migration is required, we only have 1 pod for each VMI. The solution is probably to set max unavailable to 0 instead. I'll prepare a patch today.
Created attachment 1714064 [details] Use maxUnavailable instead of minAvailable on pdb
*** Bug 1899174 has been marked as a duplicate of this bug. ***
Discussing the best solution at https://github.com/kubevirt/kubevirt/pull/4136, I'm inclined to follow Roman's idea to merge the PDB controller into the migration one as that's the place where the migration is initiated.
Opened https://github.com/kubevirt/kubevirt/pull/5424 and https://github.com/kubevirt/kubevirt/pull/5460 as proposals to fix this, I think the latter is the best solution.
*** Bug 1952509 has been marked as a duplicate of this bug. ***
To verify, follow steps to reproduce in description. Basically the critical alert previously seen will not be observed.
verify with build : virt-operator-container-v4.8.0-60 hco-bundle-registry-container-v4.8.0-380 step: create 5 vmi Wait > 10mins there is no critical PodDisruptionBuget alert shows up. do migration for all vmi wait > 10 mins no alert shows up move to verified.
Great news.
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.8.0 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/RHSA-2021:2920
I am still seeing this in recent (OpenShift 4.16.17) versions of KubeVirt.