-
Notifications
You must be signed in to change notification settings - Fork 44
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
Scope of OCI Runtime Certification with software higher in the stack #36
Comments
@alban I would like to see containerd, docker, cri-o to be certified, preferably via some testing method. Do you have any ideas how we can accomplish this or we do push the runtimes to expose this functionality? Another option is to get a dump of their dependencies and ensure they use a unmodified release of runc (that they sign an agreement too) but that's not as useful as actually exercising the operations, similar to what we do with folks that use Kubernetes in products. |
Hey @opencontainers/tob, what's your thoughts here? |
Interesting question... you could imagine a test version of runc that ensures that the interfaces are called in accordance with the spec and a test requirement that the runtime provide a log proving that they ran against that (in effect a unit test/mock runc). The challenge I could see with that is obviously building/maintaining it. |
We had talked about this in the past, and thought there to be definite benefit. Like to have a container that runs and returns a report. There was generally lack of consensus on the approach, and on whether it's worth the pursuit while the code/criteria was changing. Now that v1.0 is out, I think this is fine conversation. |
All the "higher order" runtimes listed by @caniszczyk directly call [I'm temporarily ignoring the extra fact that this Other than validating that this installed Other than that rambling, I agree there is value with being able to claim higher order runtimes have "OCI compliance" as the expectation is that it, at some point, it will be a detriment to any container-executing product/project not being visibly seen as supporting OCI specs. |
On Wed, Apr 04, 2018 at 04:19:39PM +0000, Taylor Brown wrote:
… you could imagine a test version of runc that ensures that the
interfaces are called in accordance with the spec and a test
requirement that the runtime provide a log proving that they ran
against that (in effect a unit test/mock runc).
This is an interesting angle, effectively testing *caller* compliance
with the OCI Runtime Command Line Interface [1]. Note that CRI-O, at
least, would not currently pass such a test because it require
runc-specific extensions (cri-o/cri-o#1260). I assume
it would be up to the applicant to generate a test suite to drive
their engine through whatever subset of the CLI interface was required
for compliance.
A parallel approach more like an integration test would be driving
these higher-level engines through the existing runtime-tools
validation tests. You could do that either by writing wrappers to
translate from the OCI Runtime Command Line Interface to the
higher-level APIs. Or you could do it by specifying (and implementing
runtime-tools drivers for) additional testing APIs [2].
[1]: https://github.com/opencontainers/runtime-tools/blob/v0.5.0/docs/command-line-interface.md
[2]: https://github.com/opencontainers/runtime-tools/blob/v0.5.0/docs/runtime-compliance-testing.md#supported-apis
|
That seems difficult to me:
|
The OCI Runtime Command Line Interface does not currently have anything I can point to that MUSTs support for all the specified commands. That was my intention though, so I'll file a follow-up PR there and for this discussion let's assume it does. I'm fine marking engines as compliant if they only need a subset of that API. I'd like to mark engines as non-compliant if they need any extentions beyond that API. That way, consumers would know they could use any runtime compliant with runtime-spec and the command line API with any higher-level engine compliant with the command line API.
That's fine, because mount namespaces are not part of the command line API, they're part of the runtime-spec. For command line API compliance around container config JSON, you'd just have to verify that, if
That's fine. |
Filed as opencontainers/runtime-tools#615. |
I explored this approach both in containerd (opencontainers/runtime-tools#653) and with the CRI interface (opencontainers/runtime-tools#657) but I find this quite contrived and not so meaningful because the interfaces don't exactly match. The other approaches mentioned in here:
|
To achieve runtime certification for runc, following the It is also known that some 3rd-party vendors would want to be able to apply own runc patches for security reasons.
Provide a separate runc tree that contains all known security patches to 3rd-party vendors.
|
Hey @vbatts and other @opencontainers/runc-maintainers, thoughts here |
Don't certify runc commits. Who cares if vendors add commits or change things. As long as X binary passes certification with Y criteria, who cares what code is used. Same thing for certifying high level software. First you should ask if they want to, next you should create a "test harness" for that software. I think we are all learning that we cannot force ppl to use a CLI to be OCI compliant, people use JSON over http, GRPC, etc and probably already have full compliance today, the API just does not fit into our view of what a compliant runtime is right now. |
Thanks for the reply. |
@dongsupark That is my opinion and others should weigh in, but I don't think, disallowing 3rd party patches is acceptable. There are security fixes etc that distros will push. We are certifying the API not the code. If I have some patches in my personal runc for my own uses but it passes 100% of certification, how is it not valid? |
I think this topic has gone out-of-hand -- why are we discussing certification of (As an aside, I also agree with @crosbymichael -- though that shouldn't be a surprise given that I work on a distribution. You would need to define what a "third-party patch" is and whether it makes sense to deny certification based on a documentation or trivial build issue patch -- which are patches that we've had to carry in the past. It's just silly to restrict one of the main benefits of the free software ecosystem -- the right to fork and carry your own patches -- because then |
@cyphar Thanks for your suggestion! So we have come up with a different approach following your suggestion, as described below. Please have a look, and give us feedback. Thanks. The OCI runtime compliance testsCertification for compliance with the OCI runtime spec can be done in two different ways:
Certification for the OCI runtime compliance is usually done manually mainly because each container runtime or each high-level container manager has its own interface, so there cannot be a single common layer that can be used for the certification. The OCI runtime compliance test is basically done by following these steps:
It's completely up to an individual runtime, how the verification is to be done. Let’s take cri-o as an example: an example of running runtime-specific testsLet’s assume that one runtime example Run its daemon
On the other terminal, run ordinary integration tests for
Then you are able to store the results into Uploading the runtime compliance resultsPrepare a PR to https://github.com/cncf/oci-conformance/ (The repo is TBD).
Contents of the PR
|
I think we said this multiple times, why not just make a test harness and let high level runtimes implement it, and that interface can be plugged into your test code? |
Conformance results for v1.8/AlibabaCloud
Going to close as outdated. Please re-open if more discussion necessary. |
The OCI runtime validation suite is able to test runtimes that expose the OCI Runtime interface to users (operations create, start, etc. and the config.json file). It should be possible to test software like runc, bwrap-oci, crun, railcar.
What about software that use a OCI runtime internally but don't directly expose the OCI Bundle to users, such as containerd, Docker, CRI-O? Should they be able to be certified in some ways?
I am not sure it would make much sense but I have not seen discussion whether it should be in scope of the certification or not.
Technically, if the software does not follow the OCI Runtime Command Line Interface, the validation suite cannot test it. Exposing such a CLI interface in containerd or CRI-O does not make sense to me, since their goal is to expose a gRPC interface which is semantically different to the OCI Runtime CLI.
/cc @caniszczyk
The text was updated successfully, but these errors were encountered: