Skip to content

Conversation

@rdpsin
Copy link
Contributor

@rdpsin rdpsin commented Jun 30, 2021

Stargz-snapshotter has a mechanism to support registries that do not allow multiple ranges in a single GET request. For the fallback mechanism to kick in, the snapshotter expects the registry to return an error.

Some registries like AWS ECR neither support retrieving multiple ranges of data per GET request nor return an error. Instead they send back the entire requested object.

This patch enables users to configure the fetcher to use single range mode.

Changes:

  1. fs/config/config.go: Added a field 'ForceSingleRangeMode' in BlobConfig, corresponding to 'force_single_range_mode' in config.toml
  2. fs/remote/resolver.go: Checks whether blobConfig.ForceSingleRangeMode is true; if it is, the fetcher is set to single range mode using fetcher.singleRangeMode()

Signed-off-by: Rishabh Singhvi [email protected]

…ugh config

Stargz-snapshotter has a mechanism to support registries that do not allow multiple ranges in a single GET request. For the fallback mechanism to kick in, the snapshotter expects the registry to return an error.

Some registries like AWS ECR neither support retrieving multiple ranges of data per GET request nor return an error. Instead they send back the entire requested object.

This patch enables users to configure the fetcher to use single range mode.

Changes:

1) fs/config/config.go: Added a field 'ForceSingleRangeMode' in BlobConfig, corresponding to 'force_single_range_mode' in config.toml
2) fs/remote/resolver.go: Checks whether blobConfig.ForceSingleRangeMode is true; if it is, the fetcher is set to single range mode using fetcher.singleRangeMode()

Signed-off-by: Rishabh Singhvi <[email protected]>
@ktock ktock merged commit 25c8859 into containerd:main Jul 1, 2021
@rdpsin rdpsin deleted the force-single-range-mode branch July 22, 2021 14:07
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