Skip to content

[Improvement] Replace hot mirror configuration with snapshotter-side host rewriting #732

Description

@ecdatadog

Problem Summary

The snapshotter supports "Hot updating mirror configurations" (remote.mirrors_config.dir), which injects a mirrors list into nydusd's backend config before each mount. This allows routing blob fetches through a registry mirror (e.g., a pull-through registry:2) without restarting the daemon.

nydusd removed all mirror-related configuration in dragonflyoss/nydus#1723. The mirrors field in nydusd's backend JSON config is no longer recognized. As a result, mirror configurations loaded from remote.mirrors_config.dir are silently ignored by nydusd.

Proposed Improvement

The nydusd proxy config is not a valid alternative here: it implements standard HTTP forward proxy protocol (CONNECT tunnel), while registry mirrors like registry:2 speak the OCI distribution API.

Move mirror selection into the snapshotter itself. Instead of injecting a mirrors list into nydusd config, the snapshotter rewrites the host field in the backend config before mount, pointing nydusd directly at the mirror host.

Additional Context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

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