Issue #3983
closedStill seeing lots of docker images when specifying --tags
Description
First of all, thank you for the --tags option. I already see significantly less disk usage.
I am not sure if what I am seeing here is a bug, a limitation, or output I am misunderstanding, but:
Before it was possible to set tags I had a repo that looked like so:
Before tags were set:
Id: cri-o
Display Name: None
Description: None
Content Unit Counts:
Docker Blob: 560
Docker Image: 365
Docker Manifest: 2020
Docker Manifest List: 173
Docker Tag: 2132
After setting tags all unit counts decreased except the Images:
Id: cri-o
Display Name: None
Description: None
Content Unit Counts:
Docker Blob: 16
Docker Image: 365
Docker Manifest: 10
Docker Manifest List: 5
Docker Tag: 10
The output with details looks like so, with an extremely long list of Image Id's for tags I did not specify:
pulp-admin repo list --repo-id cri-o --details
--------------------------------------------------------------------
Repositories
--------------------------------------------------------------------
Id: cri-o
Display Name: None
Description: None
Content Unit Counts:
Docker Blob: 16
Docker Image: 365
Docker Manifest: 10
Docker Manifest List: 5
Docker Tag: 10
Notes:
Scratchpad:
Tags:
Image Id: 947113c11ff6665c144efa7905d4390df9d23c104473630a2a1eb2140f67dd38
Tag: v3.9.0.20180225.223947
Image Id: 7c2737052810cbcace14693d2eae6ca5a0b980e8538c533f7c373bc94d6dd54f
Tag: v3.11.0
Image Id: 64aefd5d39a93ef7c84429239cabf31b4a8ed39460c10e3c8d1e0309775d489f
Tag: rhaos-3.8-rhel-7-docker-candidate-10731-20180107142740
Image Id: dbe7ef4db0a18079bc5286a950523ff34a7c36d464b6d671d9d2324eed0d0bbe
Tag: rhaos-3.10-rhel-7-ppc64le-containers-candidate-35156-2018072302173
8
Image Id: f338ce0b7003128737218ef7c89d7ca32f248a78218a50937585b4359c11dc0e
Tag: v3.10.14.20180720.120005
...
Importers:
Config:
Enable V1: True
Enable V2: True
Feed: http://brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
SSL Validation: False
Tags: v3.7, v3.9, v3.10, v3.11, latest
Upstream Name: openshift3/cri-o
Id: docker_importer
Importer Type Id: docker_importer
Last Override Config:
Last Sync: 2018-09-06T17:22:46Z
Last Updated: 2018-09-06T17:21:36Z
Repo Id: cri-o
Scratchpad: None
Distributors:
Auto Publish: True
Config:
Redirect-url: http://asb-registry.usersys.redhat.com/pulp/docker/v2/cri-
o
Repo-registry-id: openshift3/cri-o
Distributor Type Id: docker_distributor_web
Id: docker_web_distributor_name_cli
Last Override Config:
Last Publish: 2018-09-06T17:45:53Z
Last Updated: 2018-09-06T17:21:36Z
Repo Id: cri-o
Scratchpad:
Auto Publish: False
Config:
Redirect-url: http://asb-registry.usersys.redhat.com/pulp/docker/v2/cri-
o
Repo-registry-id: openshift3/cri-o
Distributor Type Id: docker_distributor_export
Id: docker_export_distributor_name_cli
Last Override Config:
Last Publish: None
Last Updated: 2018-09-06T17:21:36Z
Repo Id: cri-o
Scratchpad:
Updated by tomckay@redhat.com about 6 years ago
Unsure if relevant/related/problem: I synced the same repo and tag limits in foreman w/ pulp-2.17.0, but the results had zero docker_images. Which is correct, 365 (as in this issue report), zero (as I received in foreman), or something in between?
Updated by jmontleo@redhat.com about 6 years ago
If I create the repo in pulp with '--enable-v1 false' then I see no docker_images either. So I guess maybe it's the case that the tag list does not affect v1 content.
- pulp-admin docker repo list --repo-id cri-o
--------------------------------------------------------------------
Docker Repositories
--------------------------------------------------------------------
Id: cri-o
Display Name: None
Description: None
Content Unit Counts:
Docker Blob: 16
Docker Manifest: 10
Docker Manifest List: 5
Docker Tag: 10
Updated by ipanova@redhat.com about 6 years ago
The docker_images are content for v1 api.
The feature for white listening the tags are only for v2 api, given the fact that v1 content is going away, and will be completely removed in the upcoming major version of pulp3. Also note that in v1 tags are embedded and in v2 tags are treated as a separate content unit [0]
[0] https://docs.pulpproject.org/plugins/pulp_docker/tech-reference/tags.html
Any reason you still have enabled v1 registry api? Since the fallback to protocol v1 is disabled already, it does not really make sense to support both api versions for the same content in one repo. [1] [2]
For the reasons mentioned above, we did not add the white listening of tags for v1 content, in addition to the fact that it would be a nightmare to manage all the parents and ancestry dependencies of the images.
See more docs [3][4]
Please close this issue if you feel comfortable with the explanation above.
[1] https://pulp.plan.io/issues/2735
[2] https://github.com/pulp/pulp_docker/pull/195/files
[3] https://docs.pulpproject.org/plugins/pulp_docker/tech-reference/importer.html
[4] https://docs.pulpproject.org/plugins/pulp_docker/user-guide/release-notes/3.2.x.html
Updated by jmontleo@redhat.com about 6 years ago
Thanks for the explanation. And given all of that I am fine with closing this. I recreated the repos with v1 disabled last night and everything we use the registry for continued working so I am satisfied with this as an option for cleaning up, especially since it will be removed in pulp 3 anyway.
Updated by ipanova@redhat.com about 6 years ago
- Status changed from NEW to CLOSED - NOTABUG