Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1454550 - After create imagestream the usage num of 'openshift.io/imagestreams' will double counted
After create imagestream the usage num of 'openshift.io/imagestreams' will do...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity high
: ---
: 3.7.0
Assigned To: Michal Fojtik
ge liu
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-22 23:29 EDT by zhou ying
Modified: 2017-11-28 16:55 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-28 16:55:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-28 21:34:54 EST

  None (edit)
Description zhou ying 2017-05-22 23:29:02 EDT
Description of problem:
Create a imagestream and check the usage num of 'openshift.io/imagestreams' which was double counted.

Version-Release number of selected component (if applicable):
openshift version
openshift v3.6.78
kubernetes v1.6.1+5115d708d7
etcd 3.1.0

How reproducible:
always

Steps to Reproduce:
1.Login OpenShift and create project;
2.Create imagestream quota for the project:
  `oc create -f  https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/quota/openshift-object-counts.yaml`
3.Check the usage num of imagestream, should be 0;
[root@host-8-174-4 ~]# oc get quota -o yaml 
apiVersion: v1
items:
......
  spec:
    hard:
      openshift.io/imagestreams: "10"
  status:
    hard:
      openshift.io/imagestreams: "10"
    used:
      openshift.io/imagestreams: "0"

4.Create one imagestream, check the usage num of imagestreams.

Actual results:
4.After create one imagestream, the usage num of imagestream was double counted:
[root@host-8-174-4 ~]# oc tag --source=docker aosqe/caddy-docker:latest caddy-docker:latest
Tag caddy-docker:latest set to aosqe/caddy-docker:latest.
[root@host-8-174-4 ~]# oc get is
NAME           DOCKER REPO                               TAGS      UPDATED
caddy-docker   172.30.221.137:5000/testzy/caddy-docker   latest    Less than a second ago
[root@host-8-174-4 ~]# oc get quota -o yaml 
apiVersion: v1
items:
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    creationTimestamp: 2017-05-23T03:04:34Z
    name: openshift-object-counts
    namespace: testzy
    resourceVersion: "31049"
    selfLink: /api/v1/namespaces/testzy/resourcequotas/openshift-object-counts
    uid: 8c53f5dc-3f64-11e7-a4ea-fa163e70a6ab
  spec:
    hard:
      openshift.io/imagestreams: "10"
  status:
    hard:
      openshift.io/imagestreams: "10"
    used:
      openshift.io/imagestreams: "2"
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""


Expected results:
4. Should count the imagestream usage num correctly.

Additional info:
Comment 1 Michal Fojtik 2017-05-25 07:10:25 EDT
Fix here: https://github.com/openshift/origin/pull/14345
Comment 2 zhou ying 2017-05-30 23:13:54 EDT
Confirmed with latest OCP3.6 , the issue has fixed:
openshift v3.6.86
kubernetes v1.6.1+5115d708d7
etcd 3.1.0

[root@zhouy ~]# oc get is
NAME              DOCKER REPO                                 TAGS      UPDATED
mybox             172.30.135.149:5000/zhouy/mybox             latest    4 minutes ago
ruby-22-centos7   172.30.135.149:5000/zhouy/ruby-22-centos7   latest    4 minutes ago
ruby-ex           172.30.135.149:5000/zhouy/ruby-ex           latest    3 minutes ago
[root@zhouy ~]# oc get quota -o yaml 
.....
  spec:
    hard:
      openshift.io/imagestreams: "10"
  status:
    hard:
      openshift.io/imagestreams: "10"
    used:
      openshift.io/imagestreams: "3"
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""
Comment 6 errata-xmlrpc 2017-11-28 16:55:46 EST
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, 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-2017:3188

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