SOCI snapshotter ignores settings.container-registry.mirrors
Image I'm using:
Bottlerocket OS 1.65.0 (aws-k8s-1.34), arm64, with settings.container-runtime.snapshotter = "soci" and settings.container-runtime-plugins.soci-snapshotter.pull-mode = "parallel-pull-unpack".
What I expected to happen:
settings.container-registry.mirrors applies to image pulls made by the SOCI snapshotter, as it does for containerd.
What actually happened:
packages/soci-snapshotter/soci-config-toml (bottlerocket-core-kit) renders the mirrors as:
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."<registry>"]
endpoint = [...]Only the SOCI containerd plugin reads that section. Bottlerocket runs the standalone soci-snapshotter-grpc daemon, which reads mirrors from [resolver.host."<registry>".mirrors] and ignores unknown keys. So containerd resolves manifests through the mirror, but SOCI fetches every layer from the upstream registry.
We hit this with Spegel as a node-local mirror: about 2 mirror requests per image pull (manifests only), while all layer bytes came from ECR.
How to reproduce the problem:
- Set
settings.container-registry.mirrors(for example{"registry": "*", "endpoint": ["http://<node-ip>:<port>"]}) on a node with the SOCI snapshotter. - Pull an image and observe that the mirror only receives manifest requests.
I have a change ready for bottlerocket-core-kit that renders each endpoint as [[resolver.host."<registry>".mirrors]] host = "<endpoint>". For the mirrors to take effect, SOCI also needs changes (parallel pull ignores mirrors today, and "*"/http:// hosts are not handled): awslabs/soci-snapshotter#2094.
Source: bottlerocket-os/bottlerocket