Bug 1899174 - PodDisruptionBudget always causing alerts for VirtualMachines
Summary: PodDisruptionBudget always causing alerts for VirtualMachines
Keywords:
Status: CLOSED DUPLICATE of bug 1873555
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.5.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: sgott
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-18 16:33 UTC by Clark Hale
Modified: 2020-11-25 13:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-25 13:17:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Example Alert (79.99 KB, image/png)
2020-11-18 16:35 UTC, Clark Hale
no flags Details

Description Clark Hale 2020-11-18 16:33:19 UTC
User-Agent:       Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Build Identifier: 

When I create a VirtualMachine, CNV creates a PodDisruptionBudget to match that VirtualMachine.

The PDB is defined in such a way that it can never be fulfilled.  This for every VirtualMachine, there is ALWAYS a alert firing about it's PDB.

Example PDB:
=======================================================================
[chale@clarkhale ~]$ oc get pdb kubevirt-disruption-budget-h8xbz -o yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  creationTimestamp: "2020-11-18T14:46:50Z"
  generateName: kubevirt-disruption-budget-
  generation: 1
  managedFields:
  - apiVersion: policy/v1beta1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:generateName: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"fa47bd57-b3e9-487e-9b71-cf7929326a99"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        f:minAvailable: {}
        f:selector:
          .: {}
          f:matchLabels:
            .: {}
            f:kubevirt.io/created-by: {}
    manager: virt-controller
    operation: Update
    time: "2020-11-18T14:46:50Z"
  - apiVersion: policy/v1beta1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        f:currentHealthy: {}
        f:desiredHealthy: {}
        f:expectedPods: {}
        f:observedGeneration: {}
    manager: kube-controller-manager
    operation: Update
    time: "2020-11-18T14:47:03Z"
  name: kubevirt-disruption-budget-h8xbz
  namespace: openshift-cnv
  ownerReferences:
  - apiVersion: kubevirt.io/v1alpha3
    blockOwnerDeletion: true
    controller: true
    kind: VirtualMachineInstance
    name: fed-mac-test
    uid: fa47bd57-b3e9-487e-9b71-cf7929326a99
  resourceVersion: "2914083"
  selfLink: /apis/policy/v1beta1/namespaces/openshift-cnv/poddisruptionbudgets/kubevirt-disruption-budget-h8xbz
  uid: 734f324e-d1bd-4b4c-9d06-f87587a477b5
spec:
  minAvailable: 2
  selector:
    matchLabels:
      kubevirt.io/created-by: fa47bd57-b3e9-487e-9b71-cf7929326a99
status:
  currentHealthy: 1
  desiredHealthy: 2
  disruptionsAllowed: 0
  expectedPods: 1
  observedGeneration: 1
=======================================================================

The selector in this PDB links to just one pod, my kubevirt pod:

=======================================================================
[chale@clarkhale ~]$ oc get pod -l kubevirt.io/created-by=fa47bd57-b3e9-487e-9b71-cf7929326a99
NAME                               READY   STATUS    RESTARTS   AGE
virt-launcher-fed-mac-test-gqlgz   1/1     Running   0          87m
=======================================================================



Reproducible: Always

Steps to Reproduce:
1.  Create a Virtual Machine in <namespace>
2.  oc get pdb -n <namespace> <- PDB will be created 
3.  View alert in alertmanager/openshift console
Actual Results:  
Alert is always firing

Expected Results:  
No alert

Comment 1 Clark Hale 2020-11-18 16:35:15 UTC
Created attachment 1730605 [details]
Example Alert

Comment 2 Kedar Bidarkar 2020-11-25 13:17:36 UTC

*** This bug has been marked as a duplicate of bug 1873555 ***


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