Bug 1315173 - Can't show the used imagestreamsize correctly
Can't show the used imagestreamsize correctly
Product: OpenShift Origin
Classification: Red Hat
Component: Image Registry (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Maciej Szulik
Wei Sun
Depends On:
  Show dependency treegraph
Reported: 2016-03-07 02:24 EST by zhou ying
Modified: 2016-05-12 13:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-12 13:10:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description zhou ying 2016-03-07 02:24:18 EST
Description of problem:
Use the command `oc describe quota quotaname` can not show the total used imagestreamsize

Version-Release number of selected component (if applicable):
oc v1.1.3-483-g28cba69
kubernetes v1.2.0-alpha.7-703-gbc4550d

How reproducible:

Steps to Reproduce:
1. As cluster-admin create 'quota' for project:
  "apiVersion": "v1",
  "kind": "ResourceQuota",
  "metadata": {
    "name": "quota"
  "spec": {
    "hard": {
      "memory": "1Gi",
      "cpu": "20",
      "openshift.io/imagesize": "0.5Gi",
      "openshift.io/imagestreamsize": "1.5Gi",
      "openshift.io/projectimagessize": "40Gi",
      "pods": "10",
      "services": "5",

2. Login the OpenShift and create some imagestreams and push them
3. Check the quota info:
4. Check all the imagestreams info:

Actual results:
3. The total used imagestreams is always 0;
[root@ip-172-18-6-103 amd64]# oc describe quota quota
Name:                quota
Namespace:            zhouy
Resource            Used        Hard
--------            ----        ----
cpu                600m        20
memory                300Mi        1Gi
openshift.io/imagesize        0        512Mi
openshift.io/imagestreamsize    0        1536Mi
openshift.io/projectimagessize    1291975965    40Gi
pods                2        10
replicationcontrollers        2        5
resourcequotas            1        1
services            2        5

4. Can see the each one imagestream used size.
[root@ip-172-18-6-103 amd64]# oc get is
NAME                 DOCKER REPO                                  TAGS      UPDATED
custom-docker        v1        About a minute ago
mybox                      latest    9 minutes ago
myruby                    latest    6 minutes ago
mytest                    latest    16 minutes ago
origin-ruby-sample   latest    19 minutes ago
ruby-20-centos7      openshift/ruby-20-centos7                    latest    20 minutes ago
[root@ip-172-18-6-103 amd64]# oc describe is custom-docker
Name:            custom-docker
Created:        About a minute ago
Labels:            <none>
Annotations:        <none>
Docker Pull Spec:
Quota Usage:        0.40GiB / 1.51GiB

Tag    Spec        Created            PullSpec                            Image
v1    <pushed>    About a minute ago    <same>

[root@ip-172-18-6-103 amd64]# oc describe is myruby
Name:            myruby
Created:        6 minutes ago
Labels:            <none>
Annotations:        <none>
Docker Pull Spec:
Quota Usage:        0.39GiB / 1.51GiB

Expected results:
Could show the total used imagestreams correctly.

Additional info:
Comment 1 Michal Minar 2016-03-07 05:58:27 EST
That's expected. See a related documentation [1][2].

[1] https://github.com/openshift/openshift-docs/blob/master/dev_guide/quota.adoc#usage-limits
[2] https://github.com/openshift/openshift-docs/blob/master/dev_guide/quota.adoc#view-a-quota

The reason behind it is that there are many imagestreams in namespace and the usage can show value of just one. The question is which one? The same applies to images.

Would you rather see something different (e.g. a size of the biggest image stream? And the size of the biggest image)? That wouldn't be a problem.
Comment 2 Maciej Szulik 2016-03-07 17:16:37 EST
As Michal explained, this works as expected. Assigning back to QA.
Comment 3 zhou ying 2016-03-08 01:17:18 EST
According to the document, zero is ok. will verify .

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