Commit Graph

860 Commits

Author SHA1 Message Date
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 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 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
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
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 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