Feat/oci entrypoint cmd split - #3765
Conversation
oci.entrypoint keeps its existing (merged) meaning unchanged for backward compatibility. oci.cmd is additive: a client recovers the real, unmerged entry point by subtracting oci.cmd from oci.entrypoint. Signed-off-by: René Jochum <rene@jochum.dev>
Read directly from the local OCI layout via casext, the same way umoci itself reads the config blob — no extra registry round-trip or subprocess. Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
Signed-off-by: René Jochum <rene@jochum.dev>
916ec0d to
db263d1
Compare
|
So I'm kinda confused here, why are you doing all that? As far as I can tell, the code never actually uses the new configuration entry, it just gets set but has no effect. What's the problem you're trying to solve? Is it only about introspection by a 3rd party tool (incus-compose)? |
|
Thanks for looking into this.
In the end we need it to forward the right Biggest pain point is I didn't change the |
|
As you know |
|
umoci merges Entrypoint and Cmd into Process.Args before Incus sees the image The only way to recover it today is pulling the image from the registry Nothing in incusd consumes |
|
Descriptive keys should be image metadata/properties, so |
|
The rest of the patch looks good? Then I'll name the key The api extension is important for the future me :) |
|
image.XYZ is automatically generated from image properties, so you just need the client logic to set a |
|
May I put That would help me a ton to get rid of my temp instances on image creation. EDIT: the unjoined |
|
uid, gid and cwd all already exist as actual |
|
I need Also |
Hmm, that's starting to get too hackish for my taste. It's actually going to be pretty expensive to set those image properties and it's going to very confusing to users when they see the same values twice but only one of the two have any concrete impact on their instance. At this point I'm thinking it just makes more sense for incus-compose to go get the stuff it needs from the registry and then just tell Incus what to run afterwards. |
|
There is no need to set them to the image at the end I NEED |
oci.entrypointonly ever stored the merged runtimeProcess.Args(Entrypoint+Cmd concatenated), so there was no way to recover the image's
real, unmerged
ENTRYPOINT. This addsoci.cmd, the image's rawCmd,alongside it — additive,
oci.entrypointkeeps its existing meaningunchanged. Callers recover the real entry point via
oci.entrypointminusoci.cmd.client: capture the image's ownCmdfrom the local OCI layout atdownload time (via casext, same as umoci itself — no extra registry
round-trip or subprocess), bundled into the metadata tarball.
incusd/instance: populateoci.cmdat instance-create time, readstraight from the image's stored metadata blob (not the per-instance
unpacked volume, which doesn't reliably re-extract new tarball contents
across instances sharing the same cached image).
instance_oci_cmd.Verified against real registry pulls (single-
ENTRYPOINT,CMD-only, andboth-set images).