Commit Graph

846 Commits

Author SHA1 Message Date
W. Trevor King 9a6aca2562 style: Update GitHub references
They've changed their anchor pattern for inline comments.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-12 15:19:34 -08:00
Mrunal Patel 868e631000 Remove string pointers
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-12 10:04:13 -08:00
Mrunal Patel abfa798235 Merge pull request #645 from Mashimiao/config-add-key-empty-limit
config.md: add empty limit for key of annotations
2017-01-12 10:01:04 -08:00
Mrunal Patel c0206be451 Merge pull request #647 from Mashimiao/config-linux-fix-device-path
config-linux: Add restriction for duplicated device path
2017-01-12 09:57:11 -08:00
Ma Shimiao 1fc1464dbc config-linux: Add restriction for duplicated device path
I think runtime should generate an error, if devices has
duplicated device path.
Because we don't know which one is really needed.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-12 14:24:52 +08:00
Michael Crosby aad1f38ce8 Merge pull request #649 from wking/allow-tweaking
config-linux: Lift no-tweaking namespace restriction
2017-01-11 16:27:57 -08:00
W. Trevor King d43fc428aa config-linux: Lift no-tweaking namespace restriction
This restriction originally landed via 02b456e9 (Clarify behavior
around namespaces paths, 2015-09-08, #158).  The hostname case landed
via 66a0543e (config: Require a new UTS namespace for config.json's
hostname, 2015-10-05, #214) citing the namespace restriction.  The
restriciton extended to runtime namespaces in 01c2d55f (config-linux:
Extend no-tweak requirement to runtime namespaces, 2016-08-24, #538).
There was a proposal in-flight to get config-wide consistency around
the no-tweaking concept [1].

In today's meeting, the maintainer consensus was to strike the
no-tweaking restriction [2], which is what I've done here.  I've
removed the ROADMAP entry because this gives folks a way to adjust
existing containers (launch a new container which joins and tweaks the
original).

The hostname entry still mentions the UTS namespace to provide a guard
against accidental foot-gunning.  There was no no-tweaking language
for properties related to other namespaces (e.g. 'mounts').
Maybe the other namespaces have more obvious names.

[1]: https://github.com/opencontainers/runtime-spec/pull/540
[2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-01-11-22.04.log.html#l-117

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-11 15:16:54 -08:00
Mrunal Patel a3dd52f583 Merge pull request #646 from q384566678/json-test
Perfect json content
2017-01-11 14:24:24 -08:00
Mrunal Patel 985b97a9b3 Merge pull request #607 from hqhq/handle_duplicated_rlimits
Forbid duplicated rlimits with same type
2017-01-11 11:28:32 -08:00
Qiang Huang 4b42ec4480 Merge pull request #648 from hqhq/all_negative_value
Allow negative value for some resource fields
2017-01-09 21:00:19 -06:00
zhouhao 2d5e0df2f0 Perfect json content
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-01-06 10:34:38 +08:00
Mrunal Patel 7dce97bd7d Merge pull request #427 from wking/optional-hooks
config: Explicitly list 'hooks' as optional
2017-01-05 16:00:31 -08:00
Qiang Huang 082e93a2bd Allow negative value for some resource fields
Carry #499

For these values, cgroup kernal APIs accept -1 to set
them as unlimited, as docker and runc all support
update resources, we should not set drawbacks in spec.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-01-05 19:03:57 +08:00
W. Trevor King a78f255982 config: Explicitly list 'hooks' as optional
And make it omitempty, otherwise:

  $ ocitools generate --template <(echo '{}')
  $ cat config.json | jq -S .
  {
    "hooks": {},
    ...
  }

To provide space for the type information and 'optional', I've
shuffled the hook docs to follow our usual:

  * **`{property}`** ({type}, {when-needed}) {notes}

format.  I've kept the separate event-trigger sections (e.g. "###
Prestart") since they go into more detail on the timing, purpose, and
exit handling for the different events (and that seemed like too much
information to put into the nested lists).

I've replaced the Go reference from 48049d2 (Clarify the semantics of
hook elements, 2015-11-25, #255) with POSIX references (following the
new process docs) to address pushback against referencing Go [1,2] in
favor of POSIX links [3].  Rob Dolin had suggested
"platform-appropriate" wording [4], but it seems like Visual Studio
2015 supports execv [5], and providing an explicit
"platform-appropriate" wiggle seems like it's adding useless
complication.

[1]: https://github.com/opencontainers/runtime-spec/pull/427#discussion_r62362761
[2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-18-17.01.log.html#l-46
[3]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-18-17.01.log.html#l-52
[4]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-18-17.01.log.html#l-54
[5]: https://msdn.microsoft.com/en-us/library/886kc0as.aspx

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-04 14:12:16 -08:00
W. Trevor King 70858bc499 config: Adjust process.args to cite POSIX's execvp
This punts the awkward-to-enforce "MUST be available at the given path
inside of the rootfs" to the kernel, which will do a much better job
of enforcing that constraint than runtime code or a static validator.

It also punts most of the semantics to POSIX, which does a better job
than we'll do at specifying this.  The extension is necessary because
POSIX allows argv to be empty.  In the DESCRIPTION:

  The argument arg0 should point to a filename that is associated with
  the process being started by one of the exec functions.

And in RATIONALE:

  Early proposals required that the value of argc passed to main() be
  "one or greater".  This was driven by the same requirement in drafts
  of the ISO C standard.  In fact, historical implementations have
  passed a value of zero when no arguments are supplied to the caller
  of the exec functions.  This requirement was removed from the ISO C
  standard and subsequently removed from this volume of IEEE Std
  1003.1-2001 as well.  The wording, in particular the use of the word
  should, requires a Strictly Conforming POSIX Application to pass at
  least one argument to the exec function, thus guaranteeing that argc
  be one or greater when invoked by such an application.  In fact,
  this is good practice, since many existing applications reference
  argv[0] without first checking the value of argc.

But with an empty 'args' we will have no process to call (since
process lacks an explicit 'file' analog).

I chose the 2001/2004 POSIX spec for consistency with the existing
reference (which landed in 7ac41c69, config.md: reformat into a
standard style, 2015-06-30, which did not motivate it's use of an
older standard).  For 2001 vs. 2004, [1] has:

  Abstract: The 2004 edition incorporates Technical Corrigendum Number
  1 and Technical Corrigendum 2 addressing problems discovered since
  the approval of the 2001 edition. These are mainly due to resolving
  integration issues raised by the merger of the Base documents.

and the text in the linked pages uses "IEEE Std 1003.1-2001" for
internal linking.

Rob Dolin had suggested "platform-appropriate" wording [2], but it
seems like Visual Studio 2015 supports execvp [3], and providing an
explicit "platform-appropriate" wiggle seems like it's adding useless
complication.

[1]: http://pubs.opengroup.org/onlinepubs/009695399/mindex.html
[2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-18-17.01.log.html#l-54
[3]: https://msdn.microsoft.com/en-us/library/3xw6zy53.aspx

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-04 14:12:16 -08:00
W. Trevor King ca2fda108d config: Adjust process.env to immediately punt to POSIX
The uppercase letter / digit / underscore restriction is just for
"variables used by the utilities in the Shell and Utilities volume of
IEEE Std 1003.1-2001".

Copying over some POSIX wording and then linking to POSIX didn't seem
like much gain.  Just point people at POSIX and let them read about
the name=value definition, charset suggestions, etc. there.

Also link specifically to chapter 8 section 1 (instead of just chapter
8).

Rob Dolin had suggested "platform-appropriate" wording [1], but it
seems like Visual Studio 2015 supports an environment-variable array
with the same semantics [2], and providing an explicit
"platform-appropriate" wiggle seems like it's adding useless
complication.

[1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2016/opencontainers.2016-05-18-17.01.log.html#l-54
[2]: https://msdn.microsoft.com/en-us/library/431x4c1w.aspx

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-04 14:12:16 -08:00
Ma Shimiao 3f0440b474 config.md: add empty limit for key of annotations
empty key does not make any senses, we should limit it.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2016-12-28 10:40:44 +08:00
Qiang Huang ced3365b4d Merge pull request #612 from RobDolinMS/patch-12
[Bundle] Adds anchor tags for headings and bullets
2016-12-24 16:59:26 +08:00
Qiang Huang 2b2240225a Merge pull request #643 from wking/runtime-config.md-typo
runtime: Fix config.md -> config.json typo
2016-12-23 14:22:41 +08:00
Vincent Batts 84458b25b1 Merge pull request #637 from RobDolinMS/patch-17
[Config Windows] Add anchor tags for headings
2016-12-14 17:19:11 -05:00
Vincent Batts 3e395cefd0 Merge pull request #639 from RobDolinMS/patch-19
[Principles] Add anchor tags for headings
2016-12-14 17:18:54 -05:00
Vincent Batts 9b991162e0 Merge pull request #636 from RobDolinMS/patch-16
[Config Solaris] Add anchor tags for headings
2016-12-14 17:18:44 -05:00
Vincent Batts a7391744db Merge pull request #640 from RobDolinMS/patch-20
[Runtime Linux] Add anchor tags for headings
2016-12-14 17:18:02 -05:00
Vincent Batts 0fe8bc34b0 Merge pull request #638 from RobDolinMS/patch-18
[Glossary] Add anchor tags for headings
2016-12-14 17:14:33 -05:00
Vincent Batts 79032b6eae Merge pull request #642 from vbatts/version-bump
Version bump for v1.0.0-rc3
2016-12-14 14:46:37 -05:00
Vincent Batts a6118d4f9d
version: master back to -dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-12-12 13:42:18 -05:00
Vincent Batts 794ca7ac88
version: release rc3
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-12-12 13:42:06 -05:00
W. Trevor King c58e64507a ChangeLog: Document changes since v1.0.0-rc2
Through d12da90 (Merge pull request #633 from
WeiZhang555/syncup-hook-state, 2016-12-06).

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-12-07 13:41:40 -08:00
W. Trevor King 5ed105996e runtime: Fix config.md -> config.json typo
From 766abd6f (runtime.md: Require 'create' to fail if config.json
asks for the impossible, 2016-09-08, #559).

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-12-07 10:02:58 -08:00
Vincent Batts d12da90232 Merge pull request #633 from WeiZhang555/syncup-hook-state
Rename `version` to `ociVersion` according to runtime.md
2016-12-06 11:10:37 -05:00
Rob Dolin (MSFT) 109c2ec26b [Runtime Linux] Add anchor tags for headings
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
2016-11-30 16:38:46 -08:00
Rob Dolin (MSFT) cbcf1a99ef [Principles] Add anchor tags for headings
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
2016-11-30 16:36:13 -08:00
Rob Dolin (MSFT) 1be56db14c [Glossary] Add anchor tags for headings
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
2016-11-30 16:33:27 -08:00
Rob Dolin (MSFT) 7332ec1be7 [Config Windows] Add anchor tags for headings
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
2016-11-30 15:49:51 -08:00
Rob Dolin (MSFT) 5840d69db7 [Config Solaris] Add anchor tags for headings
Signed-off-by: Rob Dolin <robdolin@microsoft.com>
2016-11-30 15:42:09 -08:00
Zhang Wei c8f5a56909 Rename `version` to `ociVersion` according to runtime.md
According to definition of [state](runtime.md#State), we should rename
`version` field in `state.go` to `ociVersion`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-11-29 15:44:03 +08:00
Mrunal Patel 9ce258d034 Merge pull request #629 from wking/code-to-program
*: Replace “user-specified code” with “user-specified program”
2016-11-23 06:18:14 -08:00
W. Trevor King c45ffb4ce7 *: Replace "user-specified code" with "user-specified program"
In [1], I'd proposed replacing our old "user-specified process" with
"user-specified code" to help distinguish between 'create' (cloning
the container process) and 'start' (signaling the container process to
execve or similar the user-specified $STUFF_FROM_THE_process_CONFIG).
That PR was rejected, although the renaming proposed there had already
landed via dd0cd210 (Add a 'status' field to our state struct,
2016-05-26, #462).

This PR attempts to find a common ground between "process" (preferred
by maintainers in #466 [2,3,4], but which I consider incorrect [5])
and "code" (which maintainers found confusing [3,4,6]).  The Linux
execve(2) says "program" and unpacks that to "a binary executable, or
a script starting with a [shebang]" [7].  proc(5) documents
/proc/[pid]/exe by talking about "the executed command" [8].  The
POSIX exec docs call this the "process image" and talk about loading
it from the "new process image file" (although they also sprinkle in a
number of “program” references, apparently interchangeably with
“process image”) [9].

POSIX formally defines "command" [11], "executable file" [12], and
"program" [13].  The only reference to "process image" in the
definitions is in the "executable file" entry.  The "command"
definition is focused on the shell, the "executable file" definition
is focused on files, and the "program" definition talks about a
"prepared sequence of instructions to the system", so "program" seems
like the best fit.

[1]: https://github.com/opencontainers/runtime-spec/pull/466
     Subject: runtime: Replace "user-specified process" with "user-specified code" in 'create'
[2]: https://github.com/opencontainers/runtime-spec/pull/466#r64982402
[3]: https://github.com/opencontainers/runtime-spec/pull/466#issuecomment-223132793
[4]: https://github.com/opencontainers/runtime-spec/pull/466#issuecomment-258563220
[5]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_295
[6]: https://github.com/opencontainers/runtime-spec/pull/466#r64982165
[7]: http://man7.org/linux/man-pages/man2/execve.2.html
[8]: http://man7.org/linux/man-pages/man5/proc.5.html
[9]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
[10]: https://git.kernel.org/cgit/docs/man-pages/man-pages.git/
[11]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_104
[12]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_154
[13]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_306

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-11-18 03:42:10 -08:00
Mrunal Patel 7839cbb5dc Merge pull request #626 from duglin/specCleanup
Cleanup the spec a bit to remove WG/git text that's not really part of the spec
2016-11-16 10:47:59 -08:00
Doug Davis e7be40f0c3 Cleanup the spec a bit to remove WG/git text that's not really part of the spec
renamed an href to "container-namespace2" to avoid a dup-warning msg from
the PDF generator

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-11-16 09:50:03 -08:00
Mrunal Patel ee5a5650c7 Merge pull request #621 from wking/output-dirname-trailing-slash
Makefile: Remove trailing slash from OUTPUT_DIRNAME value
2016-11-15 12:08:38 -08:00
Qiang Huang 600b8b4616 Merge pull request #619 from wking/tk/process-header
config: Change “Process configuration” → “Process” header
2016-11-15 14:33:21 +08:00
Qiang Huang b69dcba704 Merge pull request #617 from wking/process.terminal-optional-case
config: Fix 'optional' -> 'OPTIONAL' for process.terminal
2016-11-15 14:30:55 +08:00
Daniel, Dao Quang Minh 780fc67f04 Merge pull request #622 from wking/rfc-2119-wording
README: Use recommended RFC 2119 wording
2016-11-14 18:08:49 -08:00
Daniel, Dao Quang Minh 44c6543470 Merge pull request #623 from wking/no-solaris-uid-gid-note
config: Drop Solaris UID/GID note
2016-11-14 18:06:29 -08:00
Daniel, Dao Quang Minh f6b9850fea Merge pull request #624 from wking/windows-optional-case
config: Fix 'optional' -> 'OPTIONAL' for 'windows'
2016-11-14 18:05:03 -08:00
Daniel, Dao Quang Minh 176fe8013c Merge pull request #625 from Mashimiao/spec-config-comment-fix
spec-go/config: comment fix
2016-11-14 18:03:56 -08:00
Daniel, Dao Quang Minh d7e87ca6d9 Merge pull request #627 from jonboulle/master
README: remove extraneous apostrophe
2016-11-14 17:55:52 -08:00
Jonathan Boulle 4476954bbd README: remove extraneous apostrophe
Also s/OpenContainers/OCI/ as used in the image-spec README.

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
2016-11-15 10:13:21 +09:00
Ma Shimiao f305e643dc spec-go/config: comment fix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2016-11-14 16:14:22 +08:00