Skip to content

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

Merged
alangou merged 5 commits into
mainfrom
fix/limit-bootstrap-extraction/alangou
Nov 24, 2026
Merged

alangou merged 5 commits into
mainfrom
fix/limit-bootstrap-extraction/alangou

Conversation

@alangou

@alangou alangou commented Nov 24, 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.

Continues #5816 from a branch in this repository with the same commits.

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 24, 2026
@alangou alangou added the test:e2e Requires end-to-end coverage label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

@alangou
alangou force-pushed the fix/limit-bootstrap-extraction/alangou branch from f1b10b0 to 0cb2037 Compare November 24, 2026 16:12

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the extraction budget, sparse and hard-link accounting, cleanup, configuration forwarding, and rebase interactions. No actionable findings. Eight isolated VM extraction and directory-safety tests passed against the reviewed code; full VM integration suites were not rerun.

@alangou
alangou merged commit fea4015 into main Nov 24, 2026
161 checks passed
@alangou
alangou deleted the fix/limit-bootstrap-extraction/alangou branch November 24, 2026 17:46
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 test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants