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

[2210554] KubeVirtComponentExceedsRequestedCPU alert not firing

XMLWordPrintable

    • CNV I/U Operators Sprint 237

      Description of problem:
      This alert should not fired, the metric for that doesn't catch when the conditions are met.

      How reproducible:
      Reduce the cpu request.

      Steps to Reproduce:
      1.scale down virt-operator
      oc -n openshift-cnv scale deployment virt-operator --repilicas=0
      2.Modify the cpu requested from one of the virt-components:
      oc -n openshift-cnv patch deployment virt-controller -p '{"spec": {"template": {"spec": {"containers": [{"name": "virt-controller", "resources": {"requests":

      {"cpu": "2Mi"}

      }}]}}}}'
      3.Run the metric:
      ((kube_pod_container_resource_requests

      {container=~"virt-controller|virt-api|virt-handler|virt-operator",namespace="openshift-cnv",resource="cpu"}

      ) - on (pod) group_left (node) node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate

      {namespace="openshift-cnv"}

      ) < 0

      Actual results:
      No datapoints found

      Expected results:
      The metric should fire the alert.

      Additional info:
      scale up again the virt-operator for reconciliation.
      There is a similar alert just for the memory : KubeVirtComponentExceedsRequestedMemory, this alert is fired and works when reducing the memory in the same way reducing the cpu for the alert above.

            jvilaca@redhat.com João Vilaça
            rh-ee-orevah Ohad Revah
            Ahmad Hafi Ahmad Hafi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: