Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-845

ClusterResourceQuota showing odd unit/numbers in status

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.11
    • openshift-apiserver
    • Moderate
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When creating a ClusterResourceQuota with very specific Memory limits, the status report is in rather strange format and unit.

      $ oc get clusterresourcequota.quota.openshift.io/foo-crq -o yaml
      apiVersion: quota.openshift.io/v1
      kind: ClusterResourceQuota
      metadata:
        creationTimestamp: "2022-09-02T08:31:34Z"
        generation: 1
        name: foo-crq
        resourceVersion: "1382975"
        uid: bc84f5fc-9c28-48ca-aaec-b9fb746b6abe
      spec:
        quota:
          hard:
            limits.cpu: 568m
            limits.memory: 151.51515Gi
        selector:
          annotations:
            example.iog/stage: production
          labels:
            matchLabels:
              name: frontend
      status:
        namespaces:
        - namespace: project-100
          status:
            hard:
              limits.cpu: 568m
              limits.memory: 162688153524633600u
            used:
              limits.cpu: "0"
              limits.memory: "0"
        total:
          hard:
            limits.cpu: 568m
            limits.memory: 162688153524633600u
          used:
            limits.cpu: "0"
            limits.memory: "0"
      

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

      • OpenShift Container Platform 4.11.2

      How reproducible:

      • Always

      Steps to Reproduce:
      1. Create Project Quota for specific project
      2. Create ClusterResourceQuota with limits.memory set to 151.51515Gi
      3. Check ClusterResourceQuota .status.total.hard.limits.memory and verify the value

      Actual results:

      limits.memory is reported as 162688153524633600u which is hard to digest easily. Also the unit provided is not something officially documeneted/support by kubernetes it seems, when looking at https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/

      Expected results:

      limits.memory should report the used quota in supported and documented unit to help understand the data and also translate them

      Additional info:

      This is based on https://bugzilla.redhat.com/show_bug.cgi?id=1966627

            jchaloup@redhat.com Jan Chaloupka
            rhn-support-sreber Simon Reber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: