-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using runtime-tools to test containerd #653
Comments
Oh, |
My tests so far:
With the following
The test fails with |
Ok, I think we need to add a |
@crosbymichael I started on containerd/containerd#2486 I could get it working with e.g. test I'll try to get the "state" working now. |
I could get some tests to pass using:
The difficulties are:
Then, I can compare containerd and runc. I used runtime-tools with #658.
Outputs: I'll look at the details tomorrow. |
Following discussion on opencontainers/oci-conformance#36, I am trying to see how to use runtime-tools to test containerd.
I am exploring how to write a wrapper around containerd implementing the OCI Runtime Command Line Interface that runtime-tools would use as a
$RUNTIME
to talk to containerd.containerd's
ctr
CLI tool canrun
(create+start) a container orstart
it. There is no CLI for creating one without starting it but it can be done both at the gRPC level or using the Golang client library.CLI command
cdr task start
does the following:NewTask()
method from the client library. This calls the gRPC commandc.client.TaskService().Create()
task.Start()
method from the client library. This calls the gRPC commandt.client.TaskService().Start
``
runtime-tools tests don't download images from internet but instead they create the
config.json
and therootfs
themselves with the specific configuration that need to be tested. However, the containerd interface mostly deals with images. It is possible to callcreate
in the gRPC protocol and includeconfig.json
on the wire but theroot.path
will unfortunately not be respected in the last version. A fix is in progress (containerd/containerd#2412, containerd/containerd#2418, thanks @flx42 and @crosbymichael!).Since runtime-tools tests have no control over which directory containerd will write the
config.json
received by gRPC, the rootfs prepared by runtime-tools tests will not be in the same directory. This contradicts the OCI specs (see @flx42's comment) but containerd might allow absolute paths inroot.path
outside of the bundle anyway, so that might be ok for the containerd wrapper to rely on that.The text was updated successfully, but these errors were encountered: