Commit Graph

866 Commits

Author SHA1 Message Date
Daniel Dao 279c3c095c
linux: relax filesystem requirements for container
change MUST to SHOULD so containers are not required to have all these
filesystems mounted.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-01-23 12:44:36 +00:00
Qiang Huang 579548a46e Merge pull request #465 from wking/stop-to-exit
runtime: Replace "process is stopped" with "process exits"
2017-01-22 00:29:10 -06:00
Qiang Huang a05975645a Merge pull request #660 from opencontainers/RobDolinMS-577-replace-v2
[Config Linux] Clarify: App --> Container
2017-01-21 20:41:40 -06:00
Mrunal Patel c368be6a74 Merge pull request #650 from wking/readme-header-nesting
README: Consistent header nesting
2017-01-18 14:32:21 -08:00
Vincent Batts dc0fa75942 Merge pull request #655 from Mashimiao/schema-fix-with-latest-spec
schema: fix items based on latest spec
2017-01-18 17:29:21 -05:00
Mrunal Patel 937ea7bc5c Merge pull request #490 from wking/json-schema-validate-http-schema
schema/validate: Allow schema identifiers to contain a URL scheme
2017-01-18 14:13:33 -08:00
Rob Dolin (MSFT) 646826658d [Config Linux] Clarify: App --> Container
Replaces #577

Signed-off-by: Rob Dolin (MSFT) <robdolin@microsoft.com>
2017-01-18 10:29:13 -08:00
Mrunal Patel b10c0b2c22 Merge pull request #654 from wking/unique-within-this-map
config: Bring "unique... within this map" back together
2017-01-18 09:51:53 -08:00
Mrunal Patel b12752e3ab Merge pull request #656 from wking/string-pointer-fixups
schema: Remove string pointers
2017-01-18 09:50:51 -08:00
W. Trevor King 9cc61372e8 config: Split annotations restrictions into one-per-sentence
As recommended by Daniel [1], although I've adjusted his recommended
wording slightly and split the requirements into paragraphs.

[1]: https://github.com/opencontainers/runtime-spec/pull/654#discussion_r95981169

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-13 07:31:13 -08:00
W. Trevor King 83200898a1 schema: Remove string pointers
Catch up with 868e6310 (Remove string pointers, 2017-01-12, #653).

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-13 07:09:36 -08:00
Qiang Huang 5398f4e217 Merge pull request #653 from mrunalp/remove_str_ptrs
Remove string pointers
2017-01-13 02:03:08 -06:00
Ma Shimiao 5076439d49 schema: fix items based on latest spec
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-13 13:59:16 +08:00
W. Trevor King f298e10fd4 style: Reverse pro-pointer preference to be anti-pointer
The maintainer position on this has shifted, with the sea change
coming around [1].

[1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-01-11-22.04.log.html#l-108

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-12 15:25:11 -08:00
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
Michael Crosby 6ff6acd35b Merge pull request #652 from Mashimiao/defs-add-missing-int64-pointer
defs.json: add misssing int64Pointer
2017-01-12 10:21:52 -08:00
W. Trevor King 2c8feeb36c config: Bring "unique... within this map" back together
Pull the empty-key restriction out into its own sentence (instead of
leaving it in the middle of the uniqueness restriction).

Drop the "best practice" portion, because the following line is "Keys
SHOULD be named using a reverse domain notation...", which covers that
idea more explicitly.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-12 10:05:06 -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 fa74102768 defs.json: add misssing int64Pointer
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-12 16:43:54 +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 200e86f8ef README: Consistent header nesting
And add a header for the Table of Contents.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-11 15:27:44 -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
W. Trevor King 9eb32c0e81 runtime: Replace "process is stopped" with "process exits"
proc(5) describes the following state entries in proc/[pid]/stat [1]
(for modern kernels):

* R Running
* S Sleeping in an interruptible wait
* D Waiting in uninterruptible disk sleep
* Z Zombie
* T Stopped (on a signal)
* t Tracing stop
* X Dead

and ps(1) has a bit more context [2] (for modern kernels):

* D uninterruptible sleep (usually IO)
* R running or runnable (on run queue)
* S interruptible sleep (waiting for an event to complete)
* T stopped by job control signal
* t stopped by debugger during the tracing
* X dead (should never be seen)
* Z defunct ("zombie") process, terminated but not reaped by its
  parent

So I expect "stopped" to mean "process still exists but is paused,
e.g. by SIGSTOP".  And I expect "exited" to mean "process has finished
and is either a zombie or dead".

After this commit, 'git grep -i stop' only turns up the "stopped"
state (which I've left alone for backwards compat), some poststop-hook
stuff, a reference in principles.md, a "stoppage" in LICENSE, and some
ChangeLog entries.

Also replace "container's process" with "container process" to match
usage in the rest of the repository.  After this commit:

  $ git grep -i "container process" | wc -l
  20
  $ git grep -i "container's process" | wc -l
  1

Also reword status entries to avoid "running", which is less precise
in our spec (e.g. it also includes "sleeping", "waiting", ...).

Also removes a "them" leftover from a partial plural -> singular
reroll of be594153 (Split create and start, 2016-04-01, #384).

[1]: http://man7.org/linux/man-pages/man5/proc.5.html
[2]: http://man7.org/linux/man-pages/man1/ps.1.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-05 22:45:45 -08: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