Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1344881 - [platformmanagement_public_426]The fraction of the layers uploaded should be deleted when the image pushed failed.
Summary: [platformmanagement_public_426]The fraction of the layers uploaded should be ...
Alias: None
Product: OKD
Classification: Red Hat
Component: Image Registry
Version: 3.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Michal Minar
QA Contact: Wei Sun
Depends On:
TreeView+ depends on / blocked
Reported: 2016-06-12 06:51 UTC by zhou ying
Modified: 2017-02-27 03:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-02-20 13:51:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description zhou ying 2016-06-12 06:51:31 UTC
Description of problem:
When image size exceeds the maximum limit of the limits, it will  be pushed unsuccessfully, but check the docker-registry there were layers and blobs of the image stored. Should delete  the fraction of the layers that were uploaded .

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.1-251-ga19279f
kubernetes v1.3.0-alpha.1-331-g0522e63
etcd 2.3.0

How reproducible:

Steps to Reproduce:
1. Start OpenShift and login;
2. Set the limits for the project:
more limits.yaml 
apiVersion: "v1"
kind: "LimitRange"
  name: "openshift-resource-limits"
      type: openshift.io/Image
        storage: 140Mi
      type: openshift.io/ImageStream
        openshift.io/image-tags: 5
        openshift.io/images: 8

3. Use the user token login the docker-registry;
4. Tag and push a image which size exceeds the maximum limit of the project;
    `docker tag docker.io/zhouying7780/singlelayer`
    `docker push`
5. Check the docker-registry's volume.

Actual results:
5. There were layers and blobs stored in the docker-registry.
docker exec -it 427c5c8e9cde find /registry

Expected results:
5. When push failed, the fraction of the layers that were uploaded will be deleted also.

Comment 1 Michal Minar 2016-06-13 06:18:24 UTC
You're right. This is how it should work. Unfortunately we're not there yet. This will have to wait for rework of image pruning https://trello.com/c/3ZmBKDZZ/437-8-refactor-registry-layer-and-signature-pruning.

Comment 2 Michal Fojtik 2016-10-25 14:12:00 UTC
Setting as upcoming release because this is waiting for the card Michal pointed out.

Comment 3 Michal Fojtik 2017-02-01 11:33:32 UTC
Waiting for pruning refactoring still as we don't have available info about these blobs so we can't prune them efficiently.

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