Skip to content

Zero byte file (layer) returned after GC when running with InMemory cache #2966

Open

Description

@irbull

With Docker Registry version v2.6.2-14-ga66a4c3, after deleting a repository and running the GC, the REST endpoints still returned valid responses for manifests within that repository. However, when we tried to fetch layers, the endpoint returned a 0-byte file.

Because the manifest was successfully returned, docker push did not upload new layers, however, when other services (k8s in our case) tried to pull these images they would fail. This left the registry in a corrupt state with no easy path forward to fix it.

To fix this we removed blobdescriptor: inmemory from our configuration file.

Activity

  1. glance- commented on Nov 22, 2019

    @glance-

    I've looked into this to, and it looks like there's no way to force registry into dropping its blobdescriptor cache.

    I'd suggest a simple signal is hooked up so that for example SIGHUP drops the inmemory blobdescriptor cache. As far as I've read the code the inMemoryBlobDescriptorCacheProvider has a Clear() function, so it shouldn't be that hard to plumb up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions