Description
In the current version of containerd, only one of taskOptions and runtimeOptions is ever used.
When a user uses taskOptions in cri plugin or ctr, runtimeOptions is ignored when actually creating and running the task.
|
topts := opts.TaskOptions |
|
if topts == nil || topts.GetValue() == nil { |
|
topts = opts.RuntimeOptions |
|
} |
|
request := &task.CreateTaskRequest{ |
|
ID: s.ID(), |
|
Bundle: s.Bundle(), |
The taskOptions and runtimeOptions should not be mutually exclusive; they should have a good mergence.
I think the best place for this to happen is in the client, where task options can be specifically modified based on runtimeOptions.
This issue is similar to issue #11480, but the described content covers the reason for that issue.
k8s CI tests are failing after using user namespace kubernetes/test-infra#34510 (comment)
Steps to reproduce the issue
- mv /usr/bin/runc /tmp/runc
- ctr run --runc-binary /tmp/runc --no-pivot docker.io/library/ubuntu:latest test ps
Describe the results you received and expected
ctr: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/default/test-5/log.json: no such file or directory): exec: "runc": executable file not found in $PATH: unknown
I expect to be able to use the specified runc binary and successfully run the container.
What version of containerd are you using?
containerd github.com/containerd/containerd/v2 v2.0.4 1a43cb6
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Description
In the current version of containerd, only one of taskOptions and runtimeOptions is ever used.
When a user uses taskOptions in
cri pluginorctr, runtimeOptions is ignored when actually creating and running the task.containerd/core/runtime/v2/shim.go
Lines 564 to 570 in 57d29ee
The taskOptions and runtimeOptions should not be mutually exclusive; they should have a good mergence.
I think the best place for this to happen is in the client, where task options can be specifically modified based on runtimeOptions.
This issue is similar to issue #11480, but the described content covers the reason for that issue.
k8s CI tests are failing after using user namespace kubernetes/test-infra#34510 (comment)
Steps to reproduce the issue
Describe the results you received and expected
I expect to be able to use the specified runc binary and successfully run the container.
What version of containerd are you using?
containerd github.com/containerd/containerd/v2 v2.0.4 1a43cb6
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response