Description of problem: After set the image size limit, still could push image larger than the limit to project. The image size limit does not work. Version-Release number of selected component (if applicable): openshift v3.7.0-0.126.1 kubernetes v1.7.0+80709908fd etcd 3.2.1 How reproducible: always Steps to Reproduce: 1. Create limit for the project: apiVersion: "v1" kind: "LimitRange" metadata: name: "openshift-resource-limits" spec: limits: - type: openshift.io/Image max: storage: 65Mi - type: openshift.io/ImageStream max: openshift.io/image-tags: 20 openshift.io/images: 30 2. Try to push image with size larger than the max storage size 65Mi. Actual results: 2. Push image with size larger than the max storage succeed. Expected results: 2. Should push failed. Additional info:
PR with a fix: https://github.com/openshift/origin/pull/16325
PR has merged. Moving to modified.
The previous PR is insufficient: here's a follow-up on review: https://github.com/openshift/origin/pull/16776
Oleg, Looks like you are working on this here now: https://github.com/openshift/origin/pull/16885 let me know if that's incorrect.
Confirmed with the latest OCP, the issue has fixed: openshift version openshift v3.7.0-0.179.0 kubernetes v1.7.6+a08f5eeb62 etcd 3.2.8 When try to push image larger than the limits, will met error: level=error msg="denied creating ImageStreamMapping: imagestreammappings.image.openshift.io \"singlelayer\" is forbidden: requested usage of storage exceeds the maximum limit per openshift.io/Image (159303155 > 65Mi)"
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