Repository navigation
fix: Check manifest images against the runtime class - #633
Merged
Merged
Conversation
A plain container image deployed into the unikernel runtime class never starts, and the Instance reports that the image could not be pulled anonymously. The flag deploy refuses that mismatch up front, but a manifest deploy wrote the workload without checking, and neither the help nor the plan said which class a workload with no class lands in. A manifest deploy now checks every container image against the class the workload will run in: the manifest's, else the existing workload's, else the catalog default. A refusal tells the user to set the class in the manifest, since -f does not accept --runtime-class. The plan of a new workload now names its runtime class, resolving an empty class to the catalog default, and the help says the default comes from the platform and that unikernel boots only Compute images. The default is catalog data, so the help points at the plan rather than naming a class that could go stale. The Instance message itself comes from the runtime provider and is tracked there. Fixes #619 Related to datum-cloud/unikraft-provider#257 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0xmc
enabled auto-merge
November 6, 2026 19:18
ecv
approved these changes
Nov 6, 2026
ecv
left a comment
Contributor
There was a problem hiding this comment.
Approve.
Extends the existing image/runtime-class preflight to manifest deploys and names the default class in the plan. It fails open on every lookup error, so it cannot block a deploy on registry or catalog trouble.
- Network:
build.ImagePlatformsdoes oneremote.Getper container with the local keychain, the same call the flag path already makes. Credentials go only to the image's own registry. Containers are checked serially anddeployFromFileusescontext.Background(), so an unreachable registry waits out go-containerregistry's transport timeouts per container before failing open. Bound it with a short per-image timeout. checkManifestImagesfalls back to the catalog default when the manifest and the existing workload both have no class.planRuntimeClassstates that an existing workload with no class "predates runtime classes" and leaves it unnamed, so the two disagree: redeploying a legacy classless workload with a container image on a unikernel-default catalog would be refused with no override. Confirm what admission does for an update with an empty class; if it keeps it classless, skip the check whenexistinghas no class.- Only
Sandbox.Containersare checked; a manifest without a sandbox is left to admission. Fine.
Follow-ups:
- There is no flag to skip the preflight (for example a mirror whose index lacks Compute platforms). Today the only escape is changing class; consider
--skip-image-check. - Add a test for the unreachable-registry path in
checkManifestImages(platforms returns an error, deploy proceeds).
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.
Summary
A standard container image deployed from a manifest into the unikernel class never starts, and the instance reports a misleading pull error.
Flag deploys already refuse that mismatch up front, but manifest deploys skipped the check, and neither the help nor the plan said which class a workload lands in by default.
Manifest deploys now check every image against the class the workload will run in, the plan names that class, and the help explains how the default is chosen. The misleading message itself comes from the runtime provider and is tracked in datum-cloud/unikraft-provider#257.
Test plan
Fixes #619
🤖 Generated with Claude Code