Commit Graph

47 Commits

Author SHA1 Message Date
Vincent Batts 831d961964 Merge pull request #397 from cyphar/add-cgroup-namespace
*: add support for cgroup namespace
2016-06-03 13:45:27 -04:00
Mrunal Patel 34901c10b3 Merge pull request #484 from duglin/ShowAnnot
Add annotations to the state json
2016-06-03 10:43:59 -07:00
Aleksa Sarai d514aad1bc runtime: lifecycle: environment must match config.json
Make it clear that if a runtime cannot set up an environment that
*precisely* matches the config.json provided, it must generate an error.
This is important because not doing this can cause security issues.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-06-04 00:14:39 +10:00
Qiang Huang fddb3e5527 Merge pull request #468 from wking/start-does-not-confirm-success
runtime: Remove start's "fails to run" monitoring
2016-06-03 10:20:05 +08:00
Doug Davis 9cb0c7fa6c Add annotations to the state json
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-02 13:31:09 -07:00
Doug Davis dd0cd2102b Add a 'status' field to our state struct
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-05-31 10:42:05 -07:00
W. Trevor King 7b28a16f7a runtime: Consistent indent for "However, some actions..."
The shorter-than-normal (for the rest of this list) indent landed with
the line in be594153 (Split create and start, 2016-04-01, #384).

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-31 10:25:48 -07:00
W. Trevor King 78d37e9ddf runtime: Restore leading blank line before lifecycle list
Restore the line removed by be594153 (Split create and start,
2016-04-01, #384).  Without this, GitHub renders the list as a single
paragraph.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-28 13:06:21 -07:00
W. Trevor King 9b47c1241c runtime: Remove start's "fails to run" monitoring
The in-flight runC implementation just fires a signal at the container
[1,2].  It doesn't wait around to see if the signal has an effect, or if
it causes the container to crash, etc., etc.

[1]: 28126f8039/start.go (L29-L30)
[2]: 28126f8039/libcontainer/container_linux.go (L253-L258)

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-26 23:13:25 -07:00
W. Trevor King 05a548f135 runtime: Drop create-specific API caveat from lifecycle
This wording is descended from 7117ede7 (Expand on the definition of
our ops, 2015-10-13, #225), but the idea is covered generically by
e53a72b (Clarify the operation is not for command-line api,
2016-05-24, #450), so we no longer need a create-specific note.
Especially in the lifecycle docs, where there's already enough going
on without this low-level detail.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-26 22:37:50 -07:00
Doug Davis be594153b5 Split create and start
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-05-26 16:52:18 -07:00
Mrunal Patel 32601fbb80 Merge pull request #446 from hqhq/hq_remove_MUST_JSON
Remove one JSON related MUST requirement
2016-05-26 08:06:06 -07:00
Qiang Huang e53a72b7c9 Clarify the operation is not for command-line api
Replace: https://github.com/opencontainers/runtime-spec/pull/447

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-24 15:12:36 +08:00
Qiang Huang 95f106ed9d Remove one JSON related MUST requirement
JSON is not a mandatory format, we should not use MUST
requirement on this.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-23 16:13:53 +08:00
Qiang Huang 6d879c81d5 Move errors section out of operations
The `Errors` section is more like a general description about
runtime, if it's a sub-section of `Operations`, it'll be hard
for both implementations and tests to define what this
`errors` operation really is.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-23 15:48:20 +08:00
Michael Crosby 4436094090 Merge pull request #418 from wking/optional-start-validation
runtime: Explicitly allow 'start' to not validate config.json
2016-05-18 10:30:56 -07:00
W. Trevor King d7b5e15566 runtime: Explicitly allow 'start' to not validate config.json
This spec places RFC-2119 requirements on both bundles (bundle.md,
config.md, ...)  and runtimes (runtime.md, runtime-linux.md).  While
it's possible to envision a system where bundle validation is required
before container setup begins, it is also possible to decoupled
validation and allow the runtime to blindly stumble through as far as
it can.

We already link to ocitools and OCT for testing both runtimes and
bundles [1], so users interested in pre-start validation can use those
tools.

This commit explicitly documents the non-requirement and links to
those tools, to make life less surprising for everybody.

[1]: https://github.com/opencontainers/runtime-spec/blob/v0.5.0/implementations.md#testing--tools

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-02 11:58:31 -07:00
W. Trevor King 0382257baf runtime: Fix 'step 8' -> 'step 7' references
This slipped through the renumbering in 7117ede7 (Expand on the
definition of our ops, 2015-10-13, #225).

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-02 11:40:48 -07:00
Rob Dolin (MSFT) 9630bf7acb [ Lifecycle ] Increase importance of logging errors (#410)
"errors, if any, MAY be logged" --> "errors, if any, SHOULD be logged"

Signed-off-by: Rob Dolin <RobDolin@microsoft.com>
2016-05-02 14:09:25 -04:00
Rob Dolin (MSFT) 063eb099ac [ Runtime | State] Fix typo
propeties --> properties

Signed-off-by: Rob Dolin <RobDolin@microsoft.com>
2016-04-26 17:49:31 -07:00
Vishnu kannan a7a366b334 Remove exec from required runtime functionalities.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-04-19 15:27:23 -07:00
Vincent Batts 547e00b42e *.md: normalize the "example" anchors
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-08 10:01:45 -04:00
Giuseppe Scrivano f4950a17c2 specs: fix typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-03-21 11:33:43 +01:00
Doug Davis 7117ede74b Expand on the definition of our ops
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-02-22 06:43:28 -08:00
W. Trevor King cb2da5430a config: Single, unified config file
Reverting 7232e4b1 (specs: introduce the concept of a runtime.json,
2015-07-30, #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 #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 3848a238, config-linux: specify the default devices/filesystems
  available, 2015-09-09, #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: <20151104175320.GC24652@odin.tremily.us>

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-01-27 09:51:54 -08:00
W. Trevor King 0a55d5ca5a lifecycle: Mention runtime.json
As discussed earlier [1,2].  I'm in favor of rolling it back into
config.json [3], but we aren't there yet [4].

[1]: https://github.com/opencontainers/specs/pull/231#discussion_r43262848
[2]: https://github.com/opencontainers/specs/pull/231/files#r46735828
[3]: 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: <20151104175320.GC24652@odin.tremily.us>
[4]: 4a63e81a80/bundle.md (container-format)

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-12-16 09:41:45 -08:00
W. Trevor King f89cb852ae lifecycle: Don't require /run/opencontainer/<runtime>/containers
We already require it for Linux/Unix-based systems [1], so we don't
have to repeat it here.  And other systems will use different paths,
which we haven't specified yet.  When I asked why we didn't specify a
path for Windows [2], Vincent said we were waiting on help from PoC
implementations [3].  So this commit punts the location to the "State"
section, and lets the "Lifecycle" section just focus on when the
write-to-filesystem happens.

There's also discussion about removing the filesystem state registry
completely [4], in which case we'd want to remove the whole line from
the lifecycle.

[1]: 7713efc1be (diff-b84a8d65d8ed53f4794cd2db7e8ea731L7)
[2]: https://github.com/opencontainers/specs/pull/211#discussion_r41066673
[3]: https://github.com/opencontainers/specs/pull/211#discussion_r41067134
[4]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/q6TYqVZOcX8
     Subject: removal of /run/opencontainer/containers
     Date: Wed, 25 Nov 2015 14:29:35 +0000
     Message-ID: <CAD2oYtNipt3i_C6=J4Bc-jwauo5YAvKXUqTROnPNP3vZ9+C5Vw@mail.gmail.com>

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-12-14 10:46:21 -08:00
Vincent Batts 82cfe56140 Merge pull request #231 from mrunalp/lifecycle
Add lifecycle for containers
2015-12-09 13:03:29 -05:00
Mrunal Patel 4a63e81a80 Merge pull request #144 from wking/state-version-example
runtime: Add 'version' to the state.json example
2015-12-04 13:12:12 -08:00
Mrunal Patel 7713efc1be Add lifecycle for containers
The lifecycle described is generic and should apply all platforms.
It provides leeway for the runtimes to be flexible in how they
implement it.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-12-04 15:52:39 -05:00
nponeccop c19a920a9c Example lists "root' but text mentions "bundlePath"
Signed-off-by: Andrii Melnykov <andy.melnikov@gmail.com>
2015-12-02 11:33:41 +02:00
W. Trevor King 889f775dcf runtime: Add 'version' to the state.json example
The version field was added while 180df9d (Add runtime state
configuration and structs, 2015-07-29, #87) was in-flight [1], and it
missed getting documented in the example.

[1]: https://github.com/opencontainers/specs/pull/87#issuecomment-135117343

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-12-01 14:54:45 -08:00
Doug Davis 44d9ba6a5e Add some clarity around the state.json file
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-10-05 10:28:54 -07:00
Michael Crosby 34def3a09c Rename State's Root to Bundle
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-09-29 12:09:32 -07:00
Lai Jiangshan 26d39ae967 convert **name** to **`name`**
we have both styles in the *.md, we should use only one of the styles.
**`name`** is much prettier than **name** in the result,
so we use **`name`**

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2015-09-29 22:19:26 +08:00
Vincent Batts 2d3065b335 hooks: deduplicate the hooks docs
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-09-25 11:50:22 -04:00
梁辰晔 (Liang Chenye) 8efcfad4b1 Update runtime.md
Add an explicit explanation of the hooks order.
 
Signed-off-by: Liang Chenye <liangchenye@huawei.com>
2015-09-10 14:24:28 +08:00
Vincent Batts 6cab2747d9 *.md: markdown formatting
Closes https://github.com/opencontainers/specs/issues/83

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-09-09 10:17:06 -04:00
Brandon Philips 1ebe348f97 runtime: use opencontainer vs oci
In an effort to be more discoverable and self-describing change out the
term "oci" for "opencontainer". We should consider using this as the
prefix for global namespaces going forward as oc has conflicts with
existing tools and oci is the name of the initiative not the specs.
2015-09-03 18:31:38 -07:00
Michael Crosby 180df9dd8f Add runtime state configuration and structs
This adds runtime state information for oci container's so that it can
be persisted and used by external tools.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-09-02 11:15:23 -07:00
Mrunal Patel 15dee2e03d runtime: Add prestart/poststop hooks
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Add hooks to the spec

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-08-03 14:36:42 -04:00
Lai Jiangshan 33cb754a79 runtime.md: convert oc to runc
"oc" is too short to understand here, "runc" seems better.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2015-07-26 14:58:38 +08:00
Brandon Philips 5d2eb180f6 *: re-org the spec
We had an in-person spec discussion, lets separate the spec into some
high-level sections to clarify future discussion.

Crosby agreed to let me merge to master :)
2015-06-24 17:15:48 -07:00
Patrick Chanezon ccfd8fbee6 Update runtime.md 2015-06-16 18:19:52 -07:00
Patrick Chanezon f72390fcae restore formatting 2015-06-16 18:16:23 -07:00
Patrick Chanezon 77d44b10d5 Update runtime.md 2015-06-16 18:08:14 -07:00
Patrick Chanezon e8db22fd74 created spec docs 2015-06-05 17:39:27 -07:00