Feat/inject missing annot in shim#565
Conversation
✅ Deploy Preview for urunc canceled.
|
d7e4edb to
8057742
Compare
06775f9 to
3f10f25
Compare
Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
3f10f25 to
5c3bbc8
Compare
|
@cmainas Could you take a look at this and let me know what you think? And I'd like to get ur opinion on how to pass rootfs annotation. |
cmainas
left a comment
There was a problem hiding this comment.
Hello @jiwahn ,
thank you for the PR. I have added some comments, some to resolve and others to discuss. Another thing is the use of FetchUruncAnnotations as a method for Sessions. I would prefer if we had a setup step in injectMissingAnnotations which fetches all the necessary containerd resources, and creates a struct which we use to fetch the annotations. In that way, the struct can contain only the necessary contianerd resources and nothing else. If I understand correctly the necessary resources are the namespace, contentClient and ctx. Therefore the struct could only contain these resources.
Run ChooseRootfs in the shim Create hook when bundle annotations are available and persist the result as com.urunc.internal.rootfs.params in config.json so the runtime can reuse the decision without probing mounts. Include a temporary urunc-dev#565 annotation inject path (inject_missing_annotations) until that PR merges. Keep runtime ChooseRootfs as fallback. Fixes: urunc-dev#684 Signed-off-by: sidneychang <2190206983@qq.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Hello @jiwahn , I played around a bit with the shim and I found that the then running a urunc container with which includes the labels. I have also seen the labels in k8s setup too: So, maybe that could be a way to retrieve the labels. Further testing is necessary though. |
…nc-dev#565) Merge com.urunc.unikernel.* keys from the container image into bundle config.json when the OCI spec is missing them, using a containerd session before task create. Signed-off-by: sidneychang <2190206983@qq.com>
…nc-dev#565) Merge com.urunc.unikernel.* keys from the container image into bundle config.json when the OCI spec is missing them, using a containerd session before task create. Signed-off-by: sidneychang <2190206983@qq.com>
|
Hey @cmainas and @sidneychang, I tried to resolve above comments. Please take a look at it again. |
Description
TaskService.CreateRelated issues
How was this tested?
LLM usage
GPT-5
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).