-
Notifications
You must be signed in to change notification settings - Fork 550
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: Single, unified config file #284
Conversation
c40651e
to
f523200
Compare
There aren't many semantic changes here (just the mount re-unification), but it is touching a number of files, so I expect it may cause trivial merge conflicts with a number of open PRs (e.g. #171, #267). I'm happy to rebase this PR if those land first, or to help with rebasing those PRs if this one lands first. |
Really impossible to review but I will trust that you did it right :-P LGTM |
On Tue, Dec 29, 2015 at 02:51:14AM -0800, Brandon Philips wrote:
Yeah :/. If anyone has thoughts on a more reviewable way of doing |
Tag this thread, which didn't get any pushback, and is now a pull request [1]. [1]: opencontainers/runtime-spec#284
After a brief review, all looks good, since there are not many semantic changes, I agree we can land it and fix any slipped bugs in follow up PRs. So LGTM. Since it's a big PR, I think we can wait for one more LGTM then merge. |
On Thu, Dec 31, 2015 at 12:13:04AM -0800, Qiang Huang wrote:
#88 was proposed by @philips who LGTMed this one 1, but #88 was |
I am not terribly opposed. My objection is the mapping of hooks and mounts On Thu, Dec 31, 2015 at 11:08 AM W. Trevor King [email protected]
|
On Tue, Jan 05, 2016 at 08:40:48AM -0800, Vincent Batts wrote:
Agreed, and my preferred approach to that is flagging sensitive
|
I don't follow what you're saying On Tue, Jan 5, 2016 at 3:42 PM W. Trevor King [email protected]
|
On Tue, Jan 05, 2016 at 12:45:14PM -0800, Vincent Batts wrote:
For example: Mounts… SecurityTo avoid bundle-author attacks (for example, bind-mounting sensitive Linux Example… or: Hooks… SecurityHooks execute in the runtime namespace, so they have the same access Prestart… But this depends on being able to paint a per-setting picture of an |
On Tue, Jan 5, 2016 at 10:10 PM Vincent Batts [email protected]
Yea, it really turns into a mess. I really hope we can avoid making the [1] #293 (comment) |
On Wed, Jan 6, 2016 at 2:52 AM W. Trevor King [email protected]
Do we have example use cases of when a bundle will know the exact mount If we are adding an image format to OCI I think we need to be more Brandon |
On Wed, Jan 06, 2016 at 02:20:23AM -0800, Brandon Philips wrote:
It's for a pre-release version of this spec and and old version of You have a high probability of being able to mount standardized host And if you do some template expansion after unpacking the bundle, you I see no need for the current absolute-hook-path requirement 2, and
More detailed discussion of the security implications should probably
|
Docker's Ubuntu image includes a CMD. This is portable metadata that can be overridden at container creation time - there are others, e.g. env vars. Whether the decision to override any config data is made by the user or by the infrastructure doesn't really matter, the key point to me is that any piece of data provided by the bundle's config can be modified. Is |
TBH, this effectively reads to me like "Here are the rules to provide a config that serves only as hints to the operator or the container runtime". Its seems a surprisingly non-deterministic delivery, and the security of running arbitrary code being that some hints weren't meant to be used. |
Don't disagree, but if we don't do it then aren't we in effect banning things like |
Not so much. This is why I said on the call today, there is a distinction On Wed, Jan 6, 2016 at 10:28 PM Doug Davis [email protected] wrote:
|
(which is still similar enough to the docker concept of image config and On Wed, Jan 6, 2016 at 10:41 PM Vincent Batts [email protected]
|
Additionally, I think its important to keep in mind the difference between "on the wire" bundle metadata from "on the disk" bundle metadata. I agree with you that "on disk" metadata MUST NOT be ignored, either adhere to it or generate an error. But, when we talk about including metadata in the "on the wire" bundle (whether its portable or non-portable), I think that data is view more like hints exactly for the reasons we're discussing - could be out of range, could be overridden by the user, etc... So the process in converting the metadata into "on the disk" metadata will make those decisions. I think for the purposes of this discussion we should focus just on what 'runc' needs to do its job, and not how that data is put on to disk or how its used later on (like in porting to another system). And if |
this needs a major rebase |
On Wed, Jan 13, 2016 at 03:21:05PM -0800, Vincent Batts wrote:
Yeah, and doing that is a real pain ;). In the light of the “do we
|
On Wed, Jan 13, 2016 at 03:30:29PM -0800, W. Trevor King wrote:
It sounds like we're at that point now 1, so I've rerolled with |
On Tue, Dec 29, 2015 at 08:20:03AM -0800, W. Trevor King wrote:
So no change in the commit process, but this helps a bit with $ diff -u <(git cat-file -p HEAD^:config.md; git cat-file -p HEAD^:runtime-config.md) config.md which shows what I'm suggesting (config.md) vs. a pure concatenation |
LGTM |
This is on my plate to review today. I just posted https://gist.github.com/vbatts/5ac2723c9598875ffb0e, which is the config I have been iterating on while working on #313 |
Well, #316 got merged and this needs a rebase again :/ |
LGTM. needs a rebase |
Reverting 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) after discussion on the mailing list [1]. The main reason is that it's hard to draw a clear line around "inherently runtime-specific" or "non-portable", so we shouldn't try to do that in the spec. Folks who want to flag settings as non-portable for their own system are welcome to do so (e.g. "we will clobber 'hooks' in bundles we run") are welcome to do so, but we don't have to have to split the config into multiple files to do that. There have been a number of additional changes since opencontainers#88, so this isn't a pure Git reversion. Besides copy-pasting and the associated link-target updates, I've: * Restored path -> destination, now that the mount type contains both source and target paths again. I'd prefer 'target' to 'destination' to match mount(2), but the pre-7232e4b1 phrasing was 'destination' (possibly due to Windows using 'target' for the source?). * Restored the Windows mount example to its pre-7232e4b1 content. * Removed required mounts from the config example (requirements landed in 3848a23, config-linux: specify the default devices/filesystems available, 2015-09-09, opencontainers#164), because specifying those mounts in the config is now redundant. * Used headers (vs. bold paragraphs) to set off mount examples so we get link anchors in the rendered Markdown. * Replaced references to runtime.json with references to config.json. [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/0QbyJDM9fWY Subject: Single, unified config file (i.e. rolling back specs#88) Date: Wed, 4 Nov 2015 09:53:20 -0800 Message-ID: <[email protected]> Signed-off-by: W. Trevor King <[email protected]>
On Wed, Jan 27, 2016 at 07:42:26AM -0800, Vincent Batts wrote:
Rebased around #316 with 2551cf1 → cb2da54. You can check the $ diff -u <(git diff 2551cf1^..cb2da54^) <(git diff 2551cf1..cb2da54) which shows the only differences are contextual stuff like: -@@ -195,7 +195,7 @@ type Network struct { |
config: Single, unified config file
My pull request landed on 2016-01-27 in 9017a6c [1]. [1]: opencontainers/runtime-spec#284 (comment)
This has been stale since cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284), when we dropped the attempt to distinguish between platform-independent and platform-dependent configuration. Signed-off-by: W. Trevor King <[email protected]>
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <[email protected]> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <[email protected]>
This has been stale since cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284), when we dropped the attempt to distinguish between platform-independent and platform-dependent configuration. Signed-off-by: W. Trevor King <[email protected]>
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <[email protected]> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <[email protected]>
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <[email protected]> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <[email protected]>
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <[email protected]> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <[email protected]>
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <[email protected]> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <[email protected]>
This has been stale since cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284), when we dropped the attempt to distinguish between platform-independent and platform-dependent configuration. Signed-off-by: W. Trevor King <[email protected]>
Reverting 7232e4b (specs: introduce the concept of a runtime.json,
2015-07-30, #88) after discussion on the mailing list. The main
reason is that it's hard to draw a clear line around “inherently
runtime-specific” or “non-portable”, so we shouldn't try to do that in
the spec. Folks who want to flag settings as non-portable for their
own system are welcome to do so (e.g. “we will clobber
hooks
inbundles we run”) are welcome to do so, but we don't have to have to
split the config into multiple files to do that.
There have been a number of additional changes since #88, so this
isn't a pure Git reversion. Besides copy-pasting and the associated
link-target updates, I've:
source and target paths again. I'd prefer
target
todestination
to match mount(2), but the pre-7232e4b1 phrasing was
destination
(possibly due to Windows using
target
for the source?).in 3848a23, config-linux: specify the default devices/filesystems
available, 2015-09-09, config-linux: specify the default devices/filesystems available #164), because specifying those mounts in the
config is now redundant.
get link anchors in the rendered Markdown.
runtime.json
with references toconfig.json
.