Skip to content

Conversation

@Mashimiao
Copy link

Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com

The spec does not specify any command-line APIs, so different runtime may have different APIs.
I create ContainerOperation interface and let Runtime to be parent structure, then we can implement them for different runtimes

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@wking
Copy link
Contributor

wking commented Sep 12, 2017 via email

@Mashimiao
Copy link
Author

I have to admit command line API is better for Swapping an external runtime, we have to write them into New() first if we choose to Go interface API.
But I think they have different advantages and disadvantages.
For Go interface API, with it, we can just care about whether the runtime passed the validation, nothing else.
For command line API, we not only validate runtime based on runtime-spec, but also have to check whether the harness follows the command line spec.
From this side, Go interface API may be a little mandatory but clearer for runtime validation.

Generally, I don't have strong objection to command line interface, but think Go interface API is also a good way.
Hope to hear opinions from other @opencontainers/runtime-tools-maintainers

@wking
Copy link
Contributor

wking commented Sep 13, 2017

For Go interface API, with it, we can just care about whether the runtime passed the validation, nothing else.
For command line API, we not only validate runtime based on runtime-spec, but also have to check whether the harness follows the command line spec.

If you drive the runtime through the $X API, you'll be testing whether the runtime-plus-any-$X-shim satisfies the runtime spec and the $X API. That doesn't go away if $X is Go. The "who's fault are failures" bit just gets murky if one party maintains the shim and another party maintains the runtime core. Ideally, runtimes interested in compliance testing will implement the $X API themselves, so no runtime-tools or third-party shim is needed. Runc already implements the command-line API natively, although they could alway implement other APIs instead (or in addition) if they felt like it.

@Mashimiao Mashimiao added this to the v0.5.0 milestone Nov 1, 2017
@wking
Copy link
Contributor

wking commented Jan 11, 2018

Possibly obsolete with #321 landing a commitment to at least supporting the CLI? I have no problem with runtime-tools supporting additional APIs in parallel, but am not sure we have the bandwidth to develop them now.

@Mashimiao
Copy link
Author

As #321 landed, just close this, will reopen if needed in the future

@Mashimiao Mashimiao closed this Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants