Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Image tag deletion doesn't remove image ids from _index_images #533

@dsw88

Description

@dsw88

First off, I've seen another issue that talks about not deleting image layers. Because of this, I figured I'd write my own image layer cleanup algorithm. The algorithm is simple: Walk the repositories using _index_images and mark image ids to keep. Once you're done scanning the repositories, delete all image layers that weren't marked to be kept.

I found out there's a problem with this, however: It seems that when you delete a tag in a repository, the repository's _index_images file does not get updated to remove any image layers that were only used by that tag.

It seems that since _index_images is sort of the single source for seeing what image layers a repository uses, that it should be updated accordingly whenever a tag is deleted.

I realize that doing this would increase the time it takes to do a tag delete, but as it stands currently, _index_images cannot be trusted to be the definitive list of image layers used in the repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions