Skip to content
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

manifest: Require unpackers to create a config.json from the referenced config #454

Closed
wants to merge 1 commit into from

Conversation

wking
Copy link
Contributor

@wking wking commented Nov 8, 2016

The image-tools framework has attempted this since #114, but we didn't specify whether the translation was required or what the output of the translation should be. That means downstream consumers of an unpacked image couldn't be sure if they'd find a config.json or (if they found one) which runtime-spec versions it would be compatible with. With this commit, the config output becomes specified, so consumers can post-process their config.json and/or invoke a runtime-spec 1.0.0-rc2-compatible runtime on it without worrying about the presence or version of the unpacked config.json.

I've picked 1.0.0-rc2 as the most recent runtime-spec commit. As the runtime-spec moves forward with more RCs, I expect we'll want to bump this to keep up. Once runtime-spec hits 1.0, we can probably freeze the target, since post 1.0 releases in runtime-spec's 1.x line are unlikely to make translation from the config format easier, and any 1.x-compatible runtime will be able to handle 1.0 configs.

…ed config

The image-tools framework has attempted this since d3ffc1c
(oci-image-tool: implement create-runtime-bundle, 2016-06-02, opencontainers#114),
but we didn't specify whether the translation was required or what the
output of the translation should be.  That means downstream consumers
of an unpacked image couldn't be sure if they'd find a config.json or
(if they found one) which runtime-spec versions it would be compatible
with.  With this commit, the config output becomes specified, so
consumers can post-process their config.json and/or invoke a
runtime-spec 1.0.0-rc2-compatible runtime on it without worrying about
the presence or version of the unpacked config.json.

I've picked 1.0.0-rc2 as the most recent runtime-spec commit.  As the
runtime-spec moves forward with more RCs, I expect we'll want to bump
this to keep up.  Once runtime-spec hits 1.0, we can probably freeze
the target, since post 1.0 releases in runtime-spec's 1.x line are
unlikely to make translation from the config format easier, and any
1.x-compatible runtime will be able to handle 1.0 configs.

Signed-off-by: W. Trevor King <wking@tremily.us>
@jonboulle
Copy link
Contributor

I don't think this is right; some implementations of image-spec might not care about runtime-spec at all. What about something like "Implementations that are generating a runtime-spec compliant config.json SHOULD use the parameters from this configuration as a basis" or similar?

@wking
Copy link
Contributor Author

wking commented Nov 24, 2016

...some implementations of image-spec might not care about runtime-spec at all.

So they'd unpack application/vnd.oci.image.config.v1+json to whatever they like? I guess I'd be ok with that if we provided a standard unpacker API so you could require the runtime-caller output. Otherwise we have standard formats on both sides but no standard way to get between them. And it seems like portable images would be difficult if the mapping was implementation-defined ("oh, you unpacked that config with umoci? I was expecting the image-tools translation").

@jonboulle
Copy link
Contributor

Yeah, part of the problem here is terminology (c.f. #467). But if we accepted your wording, a strict reading of the spec would preclude implementations that just e.g. manipulate images without caring about generating runtime versions.

@wking
Copy link
Contributor Author

wking commented Nov 25, 2016

But if we accepted your wording, a strict reading of the spec would preclude implementations that just e.g. manipulate images...

As it stands, this PR only constrains implementations that are "unpacking" manifests. So I don't see a problem, but I'm fine waiting on #467 and a formal definition for unpacking.

@stevvooe
Copy link
Contributor

stevvooe commented Dec 7, 2016

Rejected.

Why would we so tightly couple unpacking and conversion? In practice, there are two components to an image, a config and the root filesystem. From an image spec perspective, its only role is to provide a root filsystem and an unprocessed configuration.

If we force the unpacker to understand the runtime spec, we prevent compliant implementations from leveraging intermediate formats. We also prevent image-spec complaint unpackers from working with non-oci runtimes. There are many details reqiured in generating a runtime config that we don't want the image processing components to have to understand.

Rejected with PullApprove

@wking
Copy link
Contributor Author

wking commented Dec 7, 2016 via email

@vbatts
Copy link
Member

vbatts commented Apr 3, 2017

closing in favor of #492

@vbatts vbatts closed this Apr 3, 2017
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.

4 participants