Bug 1454550 - After create imagestream the usage num of 'openshift.io/imagestreams' will double counted
Summary: After create imagestream the usage num of 'openshift.io/imagestreams' will do...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.7.0
Assignee: Michal Fojtik
QA Contact: ge liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-23 03:29 UTC by zhou ying
Modified: 2017-11-28 21:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 21:55:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description zhou ying 2017-05-23 03:29:02 UTC
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 11:10:25 UTC
Fix here: https://github.com/openshift/origin/pull/14345

Comment 2 zhou ying 2017-05-31 03:13:54 UTC
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 21:55:46 UTC
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.