Commit Graph

933 Commits

Author SHA1 Message Date
Michael Crosby 5d3f1674e6 Rename bundlePath to bundle
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-02 13:10:54 -08:00
Vincent Batts 2a234c749b
version: master back to -dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-01-30 08:10:59 -05:00
Vincent Batts 339eba5240
version: release 1.0.0-rc4
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-01-30 08:10:51 -05:00
W. Trevor King be402e40ed ChangeLog: Document changes since v1.0.0-rc3
Through 3297cd57 (Merge pull request #216 from
wking/travis-test-branch-commits, 2017-01-24).

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-27 13:03:03 -08:00
Michael Crosby 3297cd573e Merge pull request #216 from wking/travis-test-branch-commits
.travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
2017-01-24 10:04:50 -08:00
W. Trevor King 550a73abb5 .travis.yml: Print TRAVIS_* environment variables
To make make debugging Travis environment issues more straightforward.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-23 15:59:30 -08:00
W. Trevor King dd40abea2e Makefile: Use 'ifdef TRAVIS_COMMIT_RANGE' for git-validation
Only use the auto-ranging when Travis tells us what the range is.  Use
our EPOCH_TEST_COMMIT-based range in all other cases.

ifdef is described in [1].

[1]: https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-23 15:59:05 -08:00
W. Trevor King 092743727e schema: Drop pointers and nulls
Maintainers feel (and I agree) that there's no point in explicitly
allowing a null value when callers can simply leave the property unset
[1].  This commit removes all references to "pointer" and "null" from
the JSON Schema to support that decision.  While optional properties
may sometimes be represented as pointer types in Go [2], optional
properties should be represented in JSON Schema by not including the
properties in the 'required' array.

[1]: https://github.com/opencontainers/runtime-spec/pull/555#issuecomment-272020515
[2]: style.md "Optional settings should not have pointer Go types"

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-23 11:23:44 -08:00
Michael Crosby 8df60240c3 Merge pull request #664 from wking/state-required-optional
runtime: Only require 'pid' in the state for created/running statuses
2017-01-23 10:34:26 -08:00
Michael Crosby d5a1269c87 Merge pull request #545 from Mashimiao/fix-blockio-related-validation
fix blkio related validation
2017-01-23 10:32:27 -08:00
Michael Crosby dd5e44a6b4 Merge pull request #665 from Mashimiao/schema-fix-string-ref
schema: fix invalid string reference
2017-01-23 10:31:18 -08:00
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
Ma Shimiao 1b3e2c7f26 schema: fix invalid string reference
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-23 11:49:22 +08:00
W. Trevor King 65d9d6b885 runtime: Add 'creating' to state status
To distinguish between "we're still setting this container up" and
"we're finished setting up; you can call 'start' if you like".

Also reference the lifecycle steps, because you can't be too explicit

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-22 16:46:29 -08: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
W. Trevor King 70ee91c6e3 runtime: Only require 'pid' in the state for created/running statuses
Because during creation (before 'created') we may not have a container
process yet (e.g. if we're still reading the configuration or setting
up cgroups), and in the 'stopped' phase the PID is no longer
meaningful.

Also add OPTIONAL/REQUIRED and remove colons for consistency with the
config.md.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-21 20:36:59 -08: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
W. Trevor King d9b7bc39b4 .travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
Work around travis-ci/travis-ci#4596 until that is fixed upstream [1].
This avoids pulling in commits from the base tip that aren't reachable
from the head tip (e.g. if master has advanced since the PR branched
off, and the PR is against master).  We only want to check commits
that are in the head branch but not in the base branch (more details
on the range syntax in [2]).

Once the Travis bug does get fixed, the shell replacement will be a
no-op.  So we don't have to worry about checks breaking once the bug
gets fixed, and can periodically poll the bug and remove the
workaround at out leisure after the fix.

[1]: https://github.com/travis-ci/travis-ci/issues/4596
[2]: http://git-scm.com/docs/gitrevisions#_specifying_ranges

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-01-18 20:48:54 -08: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 58832f9148 config-linux: remove unneeded null for array
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-12 14:59:40 +08:00
Ma Shimiao a04cce97ea fix blkio related validation
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-01-12 14:56:27 +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