Commit Graph

71 Commits

Author SHA1 Message Date
Vincent Batts bf58a8f544 Merge pull request #411 from anuthan/solarisSpec
Introducing Solaris in OCI
2016-05-04 16:17:37 -04:00
Abhijeeth Nuthan 7c9daebaa7 Introducing Solaris in OCI
Signed-off-by: Abhijeeth Nuthan <abhijeeth.nuthan@oracle.com>
2016-05-04 12:19:27 -07:00
Michael Crosby 07126441b3 Merge pull request #415 from wking/explicit-hook-namespace
config: Explicitly put hooks in the runtime namespace
2016-05-04 10:18:56 -07:00
W. Trevor King b373a155de config: Split platform-specific configuration into its own section (#414)
To make it clear that the whole 'linux' section is optional.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-02 14:04:39 -04:00
Amit Saha 45f7ada1bb config.md: args is an array of strings (#416)
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2016-05-01 10:10:56 -04:00
W. Trevor King a5af569061 config: Explicitly put hooks in the runtime namespace
The language from 15dee2e0 (runtime: Add prestart/poststop hooks,
2015-08-03, #34) landed well before we had glossary entries for the
runtime and container namespaces (from 5dad1255, config-linux: Specify
host mount namespace for namespace paths, 2015-12-18, #275).  Now that
we do have language to cover that concept, it's better to explicitly
say that hooks run in the runtime namespace instead of leaving it to
the reader to extrapolate from the filesystem requirement.

With the new namespace wording, the "host's filesystem" wording is
somewhat redundant.  I've left it in though, because I think it helps
to have a more gradual transition from hook paths to namespaces.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-04-29 21:07:00 -07:00
Mrunal Patel e5e603f26f Merge pull request #407 from vbatts/annotations
config: clarify annotations sentence
2016-04-28 14:46:15 -07:00
Rob Dolin (MSFT) 646868f7d4 [ Configuration | Version ] Capitalize MUST in ociVersion description
"ociVersion ... must be in SemVer ... format" --> "ociVersion ... MUST be in SemVer ... format"

Signed-off-by: Rob Dolin <RobDolin@microsoft.com>
2016-04-28 12:42:12 -07:00
W. Trevor King 440fc5b36e specs-go/config: Make Spec.Mounts omitempty (#408)
* specs-go/config: Make Spec.Mounts omitempty

Otherwise:

  $ ocitools generate --mount-cgroups=no --template <(echo {})
  $ grep mounts config.json
          "mounts": null,

The language in config.md#Mounts is:

> You can add array of mount points...

which I think means 'MAY'.

Signed-off-by: W. Trevor King <wking@tremily.us>

* config: Use 'MAY' (RFC 2119) for mounts

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-04-28 09:46:54 -04:00
Vincent Batts 0315202c12 config: clarify annotations sentence
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-27 11:40:57 -04:00
Vincent Batts 6e08c6983e Merge pull request #393 from mrunalp/mount_label
Add support for Selinux mount context labels
2016-04-22 16:43:00 -04:00
Mrunal Patel 7350d5e1f1 Add support for Selinux mount context labels
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-22 13:40:49 -07:00
Kenfe-Mickael Laventure b2e9154a31 Remove requirement for rootfs path to be relative
Closes #389

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-22 11:57:21 -07:00
W. Trevor King cf55cdc8c4 config: Move (u|g)idMappings from 'process' to 'linux'
To match where they're defined in the JSON Schema [1].  The old
location is from d4e7326d (config: JSON examples, 2016-04-06, #370),
and seems to have been accidental.

[1]: 0982071b28/schema/schema-linux.json (L21-L48)

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-04-19 22:20:38 -07:00
Mrunal Patel d6aea95de9 Merge pull request #348 from vbatts/anchor-examples
Anchor examples
2016-04-13 10:33:02 -07:00
Vincent Batts d4e7326d50 config: JSON examples
* "complete" JSON example
* fix a couple of values
* fix a missing comma

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-11 18:56:04 -04: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
Vincent Batts 7aa7dcde06 Merge pull request #347 from vbatts/user-name
config: clarify the uname mapping
2016-03-23 15:38:58 -04:00
Mrunal Patel e23fbbb408 Merge pull request #346 from crosbymichael/hook-timeout
Add timeout field to hooks
2016-03-18 10:21:31 -07:00
Vincent Batts 95f0c672a0 config: clarify the uname mapping
Closes #38

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-17 01:17:18 +00:00
Michael Crosby 5a3b1816b2 Add timeout field to hooks
So that runtimes don't lock up forever waiting on a hook to return I
added a timeout field.  This allows the author to specify the timeout in
seconds that they want the hook to run before aborting the hook and
container execution.

I think the hook is the proper place to specify a timeouot like this
because any type of overall timeout in the runtime will probably not
work for all hooks and will not be flexable enough.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-16 16:51:29 -07:00
Mrunal Patel b8d67bbaf1 Merge pull request #342 from wking/canonical-markdown-and-go-links
config: Make Markdown canonical
2016-03-16 10:30:21 -07:00
Vincent Batts 4d4a07952e Merge pull request #340 from liangchenye/master
add omitempty to 'Devices
2016-03-16 13:27:20 -04:00
liangchenye 28cc423977 add omitempty to 'Device' and 'Namespace'
Signed-off-by: liangchenye <liangchenye@huawei.com>
2016-03-11 11:28:58 +08:00
W. Trevor King 160b4a262a config: Make Markdown canonical
Also:

* Update the link to Go bindings after 7bf06d5 (source and schema:
  differentiate with examples, 2015-12-18, #276).
* Add a reference to the JSON Schema after cdcabde (schema: JSON
  Schema and validator for `config.json`, 2016-01-19, #313).

It's pretty clear that the Go bindings cannot be canonical on their
own, because they do not define limits (e.g. the 0 through 512 range
for FileMode).  The JSON Schema is closer, but still does not cover
everything (e.g. "a directory must exist at root.path").  Both the Go
bindings and the JSON Schema could grow to cover the full spec by
adding that sort of thing to comments and descriptions, but that's not
how things seem to be working now.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-03-10 13:42:35 -08:00
Julian Friedman 9d9ed06d5e Move rlimits to process
Signed-off-by: Julian Friedman <julz.friedman@uk.ibm.com>
2016-03-10 09:44:43 +00:00
Julian Friedman 77f3b7b68f Nit: systems not systemd
Signed-off-by: Julian Friedman <julz.friedman@uk.ibm.com>
2016-03-10 09:30:00 +00:00
Vincent Batts cfbf70c0ab config: formatted example json
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-09 19:40:34 +00:00
Vincent Batts 7bf06d53dd source and schema: differentiate with examples
The standard is on the JSON schema (not yet IETF spec JSON-schema), such
that it is not implemenations specific. Thus far, the reference has been
in how golang source renders the JSON documents.

Having the JSON source and the markdown documents in sync has been an
ongoing step to keep in sync.

Separating these two allows the golang source to continue being _a_
reference, but the JSON schema in the documentation to be _the_
reference.

As validation tooling is refined, then it will facilitate ensuring
the available golang source conforms to the reference JSON.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-09 19:18:20 +00:00
Mrunal Patel dae09c6a7d Merge pull request #331 from vishh/labels-annotations
Add annotations and labels to the Spec.
2016-03-09 11:15:53 -08:00
Vishnu kannan 1c49f4d21c Add annotations and labels to the Spec.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-03-09 11:11:28 -08:00
W. Trevor King 6b639d2520 config: Fix indents for process.apparmorProfile and .selinuxLabel
These slipped through in 5a8a779f (Move process specific settings to
process, 2016-03-02, #329).

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-03-02 14:35:24 -08:00
Michael Crosby 5a8a779fb0 Move process specific settings to process
This moves process specific settings like caps, apparmor, and selinux
process label onto the process structure to allow the same settings to
be changed at exec time.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-02 11:40:09 -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
Qiang Huang ec7ca919b7 Merge pull request #309 from vbatts/version_name
config: qualify the name of the version field
2016-01-18 12:07:51 +08:00
Vincent Batts 4e63ee0a1e config: qualify the name of the version field
https://github.com/opencontainers/specs/issues/110

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-01-15 10:51:53 -05:00
Doug Davis 5fb3203f6d Make cwd an abs path to avoid abiguity
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-01-15 06:10:21 -08:00
Vincent Batts 353631ab5e Merge pull request #253 from hqhq/hq_version_compat
Clarify backwards compatibility for major version 0
2016-01-13 16:46:02 -05:00
Vincent Batts 25e6674a4c config: cwd is a required default
After thorough discussion, even though a reasonable default is "/", for
platform independence, leave this up to the bundle author.

Also, by this variable being present it makes things explicit for the
runtime.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-01-13 16:32:23 -05:00
Lai Jiangshan df3f12deab define the default value for the `cwd`
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2015-12-29 11:48:07 +08:00
Qiang Huang 0f25f18b9b Clarify backwards compatibility for major version 0
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-11-18 18:55:41 +08:00
W. Trevor King 66a0543e10 config: Require a new UTS namespace for config.json's hostname
The UTS namespace is for hostnames and NIS domain names [1].  Without
a new namespace, the hostname entry would clobber the host
environment's hostname.

Clobbering the host's hostname or a joined-namespace's hostname might
be acceptable for folks who trust their bundles, but it's not allowed
by the "error out if the config specifies anything else related to
that namespace" language that landed in 02b456e9 (Clarify behavior
around namespaces paths, 2015-09-08, #158).

[1]: http://man7.org/linux/man-pages/man7/namespaces.7.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-10-05 20:20:31 -07:00
Mrunal Patel f75f23fe4e Merge pull request #142 from wking/explicitly-define-mount-order
config: Require the runtime to mount Spec.Mounts in order
2015-10-05 12:02:41 -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 70372d3880 *.md: update TOC and links
Some of the docs were not even linked to, and did not have a logic
outline for their grouping.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-09-25 11:47:16 -04:00
W. Trevor King d282a32cd8 config: Require the runtime to mount Spec.Mounts in order
If we don't specify this, some bundle-authors or runtime-implementers
might expect the runtime to intelligently order mounts to get the
"right" order [1].  But that's not possible because:

  $ mkdir -p a/b/c d/e/f h
  # mount --bind a/b h
  # mount --bind d a/b
  $ tree --charset=ascii h
  h
  `-- c

But in the other order:

  # umount a/b
  # umount h
  # mount --bind d a/b
  # mount --bind a/b h
  $ tree --charset=ascii h
  h
  `-- e
      `-- f

So there's no "right" order.  Allowing the bundle-author to specify
their intended order is both easy to implement and unambiguous.

[1]: https://github.com/opencontainers/specs/pull/136#issuecomment-137275876

Suggested-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-09-10 20:56:31 -07: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
Mrunal Patel bf52e72391 Merge pull request #139 from cloudfoundry-incubator/master
Fix links to go files in config.md
2015-09-03 15:04:48 -07:00
Will Pragnell d67689f0e2 config: fix links to go files 2015-09-03 10:18:35 +01:00
Alexander Morozov c18c283a17 Change layout of mountpoints and mounts
Added info about MountPoints to config.md.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-09-02 21:04:44 -07:00