Skip to content

petri: enable incubator HTTPS lazy fetch - #4196

Merged
Chris Oo (chris-oo) merged 1 commit into
microsoft:mainfrom
chris-oo:incubator-lazy-fetch
Aug 10, 2026
Merged

petri: enable incubator HTTPS lazy fetch#4196
Chris Oo (chris-oo) merged 1 commit into
microsoft:mainfrom
chris-oo:incubator-lazy-fetch

Conversation

@chris-oo

Copy link
Copy Markdown
Member

Inject the host CA bundle into QEMU incubator initrds and initialize the guest clock from the host so TLS certificate validation works for streamed test images.

Saves you lots of disk space.

Inject the host CA bundle into QEMU incubator initrds and initialize the guest clock from the host so TLS certificate validation works for streamed test images.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37a68718-adc1-488b-96ae-c38bb3c12d6a
Copilot AI lite review requested due to automatic review settings August 7, 2026 23:23
@chris-oo
Chris Oo (chris-oo) requested a review from a team as a code owner August 7, 2026 23:23

Copilot AI 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.

Pull request overview

This PR updates the Petri QEMU incubator boot/initrd patching so that HTTPS-based lazy fetching can validate TLS certificates inside the guest by (1) syncing the guest clock from the host and (2) providing the host CA bundle to the guest initramfs.

Changes:

  • Inject a host CA bundle into the incubator initrd and point TLS consumers at it via SSL_CERT_FILE.
  • Initialize guest time in the injected rdinit script based on the host’s current Unix epoch seconds.
  • Add host-side CA bundle discovery logic with a fallback search path list.
Suppressed comments (1)

petri/incubator/src/qemu.rs:228

  • With the init script now needing a host timestamp, compute host_epoch_seconds here (returning an error instead of panicking) and pass it into build_init_script. This keeps the init script builder infallible while still avoiding a hard panic on misconfigured host clocks.
        0o100755, // regular file, rwxr-xr-x
    )
    .context("failed to inject init script into initrd")?;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread petri/incubator/src/qemu.rs
Comment thread petri/incubator/src/qemu.rs
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

@chris-oo
Chris Oo (chris-oo) merged commit a581910 into microsoft:main Aug 10, 2026
68 of 69 checks passed
@chris-oo
Chris Oo (chris-oo) deleted the incubator-lazy-fetch branch August 10, 2026 18:29
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.

3 participants