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

config-vm: Recycle the 'process' schema #1

Closed

Conversation

wking
Copy link
Collaborator

@wking wking commented Mar 8, 2018

This is my requested update to opencontainers#949.

We already have two ways to specify a process to launch (for the container process and for hooks). This commit recycles the container process schema for launcing the hypervisor. I've dropped the terminal configuration because callers are unlikely to need control over their hypervisor's standard streams, but otherwise this is the same structure.

The JSON Schema cheats a bit by not forbidding the terminal properties. We could address that if we really wanted to (JSON Schema makes it hard to extend a previously-defined object), but I'm leaving it to downstream tools in this commit.

I've split this PR into two commits. The first implements my preferred reference-style approach. The second implements @crosbymichaels' preferred copy/paste approach. The copy/paste approach allows you to extend one schema without (accidentally?) extending the other (the terminal properties are an example of this). I think the overlap is much greater than the differences, so I'd rather use the first commit's “is is the same, except for …” approach. But as far as configurations are concerned, the two approaches are identical, so I don't really care.

I've left the JSON Schema change off the copy/paste commit for now, I'll go back through and adjust that once we have a maintainer confirming the copy/paste approach.

@sameo sameo force-pushed the vm-section branch 3 times, most recently from 2ab053e to 74b670e Compare March 9, 2018 22:06
@wking wking force-pushed the use-process-structure-for-hypervisor branch from ebccf3f to 96c89b2 Compare March 9, 2018 22:49
wking added 2 commits March 9, 2018 14:49
We already have two ways to specify a process to launch (for the
container process and for hooks).  This commit recycles the container
process schema for launcing the hypervisor.  I've dropped the terminal
configuration because callers are unlikely to need control over their
hypervisor's standard streams, but otherwise this is the same
structure.

The JSON Schema cheats a bit by not forbidding the terminal
properties.  We could address that if we really wanted to (JSON Schema
makes it hard to extend a previously-defined object), but I'm leaving
it to downstream tools in this commit.

Signed-off-by: W. Trevor King <wking@tremily.us>
Michael asked for this [1], because it allows you to extend one schema
without extending the other (the terminal properties are an example of
this).  I think the overlap is much greater than the differences, so
I'd rather use the previous commit's "is is the same, except for ..."
approach.  But as far as configurations are concerned, the two
approaches are identical, so I don't really care.

I've left the JSON Schema change off this commit for now, I'll go back
through and adjust that once we have a maintainer confirming the
copy/paste approach.

[1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2018/opencontainers.2018-03-07-22.00.log.html#l-53

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

wking commented Apr 2, 2018

With opencontainers#949 merged and this approach rejected, I'm closing this.

@wking wking closed this Apr 2, 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.

1 participant