Skip to content

fix(vm): bound OCI bootstrap image extraction - #5816

Draft
alangou wants to merge 5 commits into
ai-openshell:mainfrom
alangou:fix/limit-bootstrap-extraction/alangou
Draft

alangou wants to merge 5 commits into
ai-openshell:mainfrom
alangou:fix/limit-bootstrap-extraction/alangou

Conversation

@alangou

@alangou alangou commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Why

Bound how much data the VM driver expands on its host when it prepares an operator-selected registry bootstrap image.

What changed

Apply a per-image budget across layers in manifest order. Decoded tar streams, including headers and padding, must fit the limit. The output budget covers staging and merge, sparse logical sizes, and copies of hard links. A 4 KiB minimum per entry and per staged parent component bounds amplification from empty files and implicit directories. Downloads and digest checks remain parallel.

Set bootstrap_extraction_max_bytes in the VM driver configuration to override the 10 GiB default. A rejected build removes its staging tree and creates no cache entry.

Scope

This covers cold registry bootstrap preparation. Compressed downloads, filesystem metadata, final ext4 formatting and local container-engine exports have separate storage costs.

Verification

  • Ran the VM driver suite and gateway VM configuration tests.
  • Drove the CLI, a gateway, the VM driver and a loopback OCI registry with plain tar, gzip and zstd layers. The driver accepted 2,097,152 decoded bytes and rejected 2,097,153 at the configured 2 MiB limit.
  • Repeated the oversized image and rejected a metadata-heavy fixture for each format, then retried the same tag with a valid image. Verified the marker files in the ext4 output and checked the cache and staging directories after each rejection. The fixture stops before guest startup.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 20, 2026
Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant