petri: enable incubator HTTPS lazy fetch - #4196
Merged
Chris Oo (chris-oo) merged 1 commit intoAug 10, 2026
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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
rdinitscript 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_secondshere (returning an error instead of panicking) and pass it intobuild_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.
Steven Malis (smalis-msft)
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.