Repository navigation
feat: add StatImageManifest and AnnounceImageManifest to scheduler - #702
Merged
Merged
Conversation
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>
chlins
requested review from
Fricounet,
Zephyrcf,
anjia0532,
gaius-qi,
hhhhsdxxxx and
yyzai384
November 20, 2026 07:16
…-manifest Signed-off-by: Gaius <gaius.qi@gmail.com>
3 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 attl. The scheduler keeps it until thettlexpires.StatImageManifest: returns the image manifest that the tag is resolved to. The scheduler does not access the registry.referenceis the image reference with the tag, for exampledocker.io/library/nginx:latest. The digest, the media type and the size are what a client needs from the response ofHEAD /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 thettlcan still be resolved from the scheduler.Screenshots (if appropriate)