Skip to content

feat: add StatImageManifest and AnnounceImageManifest to scheduler - #702

Merged
gaius-qi merged 2 commits into
mainfrom
feature/image-manifest
Nov 23, 2026
Merged

gaius-qi merged 2 commits into
mainfrom
feature/image-manifest

Conversation

@chlins

@chlins chlins commented Nov 20, 2026

Copy link
Copy Markdown
Member

Description

Add two RPCs to the scheduler, so the peers can share the image manifest that the tag of the image is resolved to.

  • AnnounceImageManifest: the peer that resolved the tag from the registry announces the digest, the media type and the size of the image manifest, with a ttl. The scheduler keeps it until the ttl expires.
  • StatImageManifest: returns the image manifest that the tag is resolved to. The scheduler does not access the registry.

reference is the image reference with the tag, for example docker.io/library/nginx:latest. The digest, the media type and the size are what a client needs from the response of HEAD /v2/<name>/manifests/<tag> to resolve the tag.

The RPCs and the messages are new, so the change is wire compatible with 2.3.12. Regenerate the Go, Rust and Python bindings and bump the version to 2.3.13.

References: a tag service that maps a tag to a descriptor (media type, digest, size) with get and put is how distribution models it (https://github.com/distribution/distribution/blob/main/tags.go). Kraken keeps the mapping in the build-index with the same pair of operations (https://github.com/uber/kraken/blob/master/build-index/tagclient/client.go).

Related Issue

dragonflyoss/dragonfly#5116

Motivation and Context

A tag is resolved by HEAD /v2/<name>/manifests/<tag>, which always goes to the registry. When the registry is unavailable, an image can not be pulled by the tag even if the peers hold all the content. With these RPCs, the tags that were resolved within the ttl can still be resolved from the scheduler.

Screenshots (if appropriate)

Add StatImageManifest and AnnounceImageManifest to the scheduler, so the
peers can share the image manifest that the tag of the image is resolved
to. The peer that resolved the tag from the registry announces the
digest, the media type and the size of the image manifest with a ttl, and
the other peers stat it from the scheduler instead of the registry until
the ttl expires. The scheduler does not access the registry.

Related to dragonflyoss/dragonfly#5116.

Signed-off-by: Chlins Zhang <chlins.zhang@gmail.com>
…-manifest

Signed-off-by: Gaius <gaius.qi@gmail.com>

@gaius-qi gaius-qi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi
gaius-qi merged commit c6d6654 into main Nov 23, 2026
6 checks passed
@gaius-qi
gaius-qi deleted the feature/image-manifest branch November 23, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants