Bug 1324812 - [platformmanagement_public_426]The usage of openshift.io/imagestreamimages will exceed the Hard
Summary: [platformmanagement_public_426]The usage of openshift.io/imagestreamimages wi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Image Registry
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Minar
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-07 11:02 UTC by zhou ying
Modified: 2016-05-12 17:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:09:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhou ying 2016-04-07 11:02:00 UTC
Description of problem:
The usage of openshift.io/imagestreamimages will exceed the Hard

Version-Release number of selected component (if applicable):
openshift v0.5.3-6613-g37ffc85
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

How reproducible:
always

Steps to Reproduce:
1. Create quota for the project;
more quota.yaml 
apiVersion: v1
kind: ResourceQuota
metadata:
  name: object-counts
spec:
  hard:
    configmaps: "10" 
    openshift.io/imagestreamtags: "7"
    openshift.io/imagestreamimages: "14" 
    persistentvolumeclaims: "4" 
    replicationcontrollers: "20" 
    secrets: "10" 
    services: "10"

2. Create some image referenct or build some images;
3. Check the usage of openshift.io/imagestreamimages ;


Actual results:
The usage of openshift.io/imagestreamimages will acceed the Hard
oc describe quota
Name:                object-counts
Namespace:            zhouy
Resource            Used    Hard
--------            ----    ----
configmaps            0    10
openshift.io/imagestreamimages    17    14
openshift.io/imagestreamtags    6    7
persistentvolumeclaims        0    4
replicationcontrollers        3    20
secrets                9    10
services            2    10


Expected results:
The max usage of openshift.io/imagestreamimages should not  exceed the Hard

Comment 1 Michal Minar 2016-04-07 14:26:01 UTC
The usage of openshift.io/imagestreamimages is counted lazily. If you tag a new image reference into the project, the usage will be incremented by 2 (1 for a reference in the spec and one for the status). The catch is that a first increment by 1 happens at once, the second increment happens during the next quota sync after the image is imported.

Therefor if you are below the quota, you can tag several images over the limit until it is synced.

Once the usage > hard limt, you won't be able to tag or push any more images though.

An exception is a manual push or atomated build - a usage increment is immediate. Thus the admission checks will be precise while doing just builds.

Comment 2 zhou ying 2016-04-08 02:05:20 UTC
Thanks for the answer, will verify this issue.


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