1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2026-02-05 18:45:18 +01:00
Commit Graph

1052 Commits

Author SHA1 Message Date
W. Trevor King
fae94dbab0 config-linux: Remove redundant MUST for minimum cgroup controllers
Any runtime which violated that constraint would necessarily violate
some more specific constraint on a 'resources' setting.

This also removes a non-spec-requirement "required" to avoid any
confusion with the spec-requirement REQUIRED [1].

[1]: https://github.com/opencontainers/runtime-spec/pull/729#issue-214550260

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-10 13:41:54 -07:00
Tianon Gravi
cd92a0e385 Merge pull request #713 from Mashimiao/config-linux-fix-network-interface
config-linux: make interface name clear
2017-05-10 13:12:25 -07:00
Daniel, Dao Quang Minh
f56fe8ba78 Merge pull request #796 from Mashimiao/small-tfix
small typo fix
2017-05-10 11:17:01 -05:00
Tianon Gravi
60fa44d737 Merge pull request #703 from Mashimiao/schema-fix-user
schema: add username for user field
2017-05-10 08:14:36 -07:00
Ma Shimiao
3864175855 small typo fix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-05-10 19:57:34 +08:00
Daniel, Dao Quang Minh
d974e9db4b Merge pull request #793 from wking/unique-solaris-zonecfg-link-target
config-solaris: Restore 'zonecfg.1m_2' link targets
2017-05-09 23:30:01 -05:00
Daniel, Dao Quang Minh
8202372717 Merge pull request #789 from wking/move-oom-adj-to-process
config: Shift oomScoreAdj from linux.resources to process
2017-05-09 23:19:05 -05:00
Qiang Huang
db100f434f Merge pull request #730 from wking/drop-access-control-concerns
runtime: Drop "Barring access control concerns"
2017-05-10 09:56:26 +08:00
Qiang Huang
4245201619 Merge pull request #794 from wking/consistent-solaris-zonecfg-link-target
config: Update zonecfg(1M) link to match config-solaris.md
2017-05-10 09:53:14 +08:00
Michael Crosby
43c21541cb Merge pull request #737 from wking/config-lead-in
config: Lead off with the purpose of the config
2017-05-09 16:57:27 -07:00
W. Trevor King
4b49c64a88 config: Shift oomScoreAdj from linux.resources to process
The only discussion related to this is in [1,2], where the
relationship between oomScoreAdj and disableOOMKiller is raised. But
since 429f936 (Adding cgroups path to the Spec, 2015-09-02, #137)
resources has been tied to cgroups, and oomScoreAdj is not about
cgroups.  For example, we currently have (in config-linux.md):

  You can configure a container's cgroups via the resources field of
  the Linux configuration.

I suggested we move the property from linux.resources.oomScoreAdj to
linux.oomScoreAdj so config authors and runtimes don't have to worry
about what cgroupsPath means if the only entry in resources is
oomScoreAdj.  Michael responded with [4]:

  If anything it should probably go on the process

So that's what this commit does.

I've gone with the four-space indents here to keep Pandoc happy (see
7795661 (runtime.md: Fix sub-bullet indentation, 2016-06-08, #495),
but have left the existing entries in this list unchanged to reduce
churn.

[1]: https://github.com/opencontainers/runtime-spec/pull/236
[2]: https://github.com/opencontainers/runtime-spec/pull/292
[3]: https://github.com/opencontainers/runtime-spec/pull/137
[4]: https://github.com/opencontainers/runtime-spec/issues/782#issuecomment-299990075

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 16:46:30 -07:00
Michael Crosby
a6d839bd5f Merge pull request #792 from wking/pointer-for-console-size
specs-go/config: Use a pointer for Process.ConsoleSize
2017-05-09 15:05:15 -07:00
W. Trevor King
57795f4311 config: Update zonecfg(1M) link to match config-solaris.md
With the same link update that config-solaris.md got in ea65eb3d
(config-solaris.md: fix info, 2017-04-28, #786), since the old link
404s.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 14:56:56 -07:00
W. Trevor King
27c045ab67 config-solaris: Restore 'zonecfg.1m_2' link targets
These were added in f9dc90b0 (make link usage consistent across the
specification, 2017-08-09, #687) to follow the new _N name-dedup
policy discussed in style.md.  They were removed in ea65eb3d
(config-solaris.md: fix info, 2017-04-28, #786), overlooking that
policy.  This commit brings them back.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 14:50:16 -07:00
W. Trevor King
ff071ccb02 config: Lead off with the purpose of the config
Instead of leading off with links to a bunch of other places, notes on
the Go tags, etc., make things more inviting by leading off with a
big-picture summary of what the configuration is about.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 14:12:55 -07:00
W. Trevor King
d42b44b8ff specs-go/config: Use a pointer for Process.ConsoleSize
Avoid injecting:

  "consoleSize":{"height":0,"width":0}

when serializing with Go's stock JSON serializer. Using a pointer for
this optional struct property works around [1].

[1]: https://github.com/golang/go/issues/11939

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 14:10:54 -07:00
Michael Crosby
5a39b39397 Merge pull request #756 from wking/config-drop-filename
config: Drop the redundant config.json filename requirement
2017-05-09 13:56:36 -07:00
Michael Crosby
e1b2e61320 Merge pull request #764 from wking/strictly-positive-timeout
config: Require strictly-positive timeout values
2017-05-09 13:43:24 -07:00
Mrunal Patel
01ec62d3e4 Merge pull request #781 from wking/oomScoreAdj-rfc-2119
config-linux: RFC 2119 wording for oomScoreAdj
2017-05-09 13:13:45 -07:00
Michael Crosby
8976b0a8ac Merge pull request #785 from wking/schema-tests
schema: Add 'test' target to the Makefile
2017-05-09 13:10:56 -07:00
Michael Crosby
ee87262926 Merge pull request #786 from q384566678/fix-solaris
config-solaris.md: fix info
2017-05-09 13:09:04 -07:00
Mrunal Patel
9b4b6d796c Merge pull request #787 from wking/intel-rdt-style
config-linux: RFC 2119 wording for intelRdt
2017-05-09 13:08:00 -07:00
W. Trevor King
0b7efd2235 schema: Add 'test' target to the Makefile
And fill in some known-good and known-bad examples.  We can make this
as detailed as we want, but this commit just adds enough to know that:

* The full-file spec examples are valid.
* The JSON Schema can distinguish valid examples from invalid JSON.

This will help catch JSON Schema typos like those being addressed by
[1].

[1]: https://github.com/opencontainers/runtime-spec/pull/784

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 11:10:49 -07:00
Michael Crosby
70e26370d8 Merge pull request #784 from q384566678/schema-fix
schema: bug fixes
2017-05-09 09:48:59 -07:00
Michael Crosby
6a17a38085 Merge pull request #783 from q384566678/range-limt
Remove range limit
2017-05-09 09:48:17 -07:00
W. Trevor King
b11ade4616 config-linux: RFC 2119 wording for intelRdt
So we can compliance-test runtimes for these settings.

Also remove the tutorial, since the kernel docs should provide
sufficient documentation on that front.  The kernel can be patched if
they do not, and we do not include tutorials for other config-linux
settings in this spec.

The updated example was recommended by Xiaochen to compensate for the
removed inline tutorial [1].

[1]: https://github.com/opencontainers/runtime-spec/pull/787#discussion_r114254422

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 09:29:49 -07:00
W. Trevor King
e9a39e76f4 config-linux: RFC 2119 wording for oomScoreAdj
The previous wording hinted at, but did not require, this setting to
be implemented via oom_score_adj.  With the new wording, when proc is
mounted at /proc, the container process can check this value by
looking at /proc/self/oom_score_adj.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-05-09 09:28:25 -07:00
Qiang Huang
101e6f9d5c Merge pull request #788 from darrenstahlmsft/RemoveReservation
Remove Memory reservation on Windows
2017-05-09 09:55:14 +08:00
zhouhao
ea65eb3d2a config-solaris.md: fix info
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-05-09 09:48:32 +08:00
Darren Stahl
aaed975b55 Remove Memory reservation on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-08 17:41:51 -07:00
Daniel, Dao Quang Minh
d42f1eb741 Merge pull request #777 from darrenstahlmsft/WindowsCpuMaximum
Change Windows CPU Percent to Maximum
2017-05-08 16:35:35 -05:00
Darren Stahl
7d007ca1d4 Change Windows CPU Percent to Maximum
In order to increase the granularity of CPU resource control, change
the CPU Percent (0-100) resource setting to CPU Maximum (0-10000)

Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-08 14:08:26 -07:00
zhouhao
11d1ae747c schema: Format fix
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-27 13:57:49 +08:00
zhouhao
79494b2175 schema: Fix the error
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-27 13:49:18 +08:00
zhouhao
d417d39f85 Remove range limit
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-27 13:42:47 +08:00
Mrunal Patel
13895d6074 Merge pull request #775 from q384566678/rootfs-enum
schema: Add enumeration to rootfsPropagation values
2017-04-26 15:59:09 -07:00
Tianon Gravi
138ad89ca8 Merge pull request #768 from wking/optional-syscalls
config-linux: Make linux.seccomp.syscalls OPTIONAL
2017-04-26 08:29:52 -07:00
v1.0.0.batts
c6bff91450 Merge pull request #769 from wking/require-syscall-names
config-linux: Require at least one entry in linux.seccomp.sycalls[].names
2017-04-26 11:26:05 -04:00
v1.0.0.batts
482fe6bf1c Merge pull request #773 from q384566678/device-up
config-linux.md: Update the link to the devices
2017-04-26 11:16:05 -04:00
Mrunal Patel
cb90a82fc1 Merge pull request #778 from wking/schema-makefile-phony
schema/Makefile: Add .PHONY declarations for phony targets
2017-04-26 08:08:27 -07:00
Mrunal Patel
5492fc0bf6 Merge pull request #780 from hqhq/remove_blkio_range
Remove range limit which depend on kernel
2017-04-26 08:07:04 -07:00
Qiang Huang
ce55de2517 Remove range limit which depend on kernel
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-04-26 22:46:02 +08:00
W. Trevor King
42984e8d3c config-linux: Make linux.seccomp.syscalls OPTIONAL
Before this commit, linux.seccomp.sycalls was required, but we didn't
require an entry in the array.  That means '"syscalls": []' would be
technically valid, and I'm pretty sure that's not what we want.

If it makes sense to have a seccomp property that does not need
syscalls entries, then syscalls should be optional (which is what this
commit is doing).

If it does not makes sense to have an empty/unset syscalls then it
should be required and have a minimum length of one.

Before 652323c (improve seccomp format to be more expressive,
2017-01-13, #657), syscalls was omitempty (and therefore more
optional-feeling, although there was no real Markdown spec for seccomp
before 3ca5c6c, config-linux.md: fix seccomp, 2017-03-02, #706, so
it's hard to know).  This commit has gone with OPTIONAL, because a
seccomp config which only sets defaultAction seems potentially valid.

The SCMP_ACT_KILL example is prompted by:

On Tue, Apr 25, 2017 at 01:32:26PM -0700, David Lyle wrote [1]:
> Technically, OPTIONAL is the right value, but unless you specify the
> default action for seccomp to be SCMP_ACT_ALLOW the result will be
> an error at run time.
>
> I would suggest an additional clarification to this fact in
> config-linux.md would be very helpful if marking syscall as
> OPTIONAL.

I've phrased the example more conservatively, because I'm not sure
that SCMP_ACT_ALLOW is the only possible value to avoid an error.  For
example, perhaps a SCMP_ACT_TRACE default with an empty syscalls array
would not die on the first syscall.  The point of the example is to
remind config authors that without a useful syscalls array, the
default value is very important ;).

Also add the previously-missing 'required' property to the seccomp
JSON Schema entry.

[1]: https://github.com/opencontainers/runtime-spec/pull/768#issuecomment-297156102

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-04-25 15:06:57 -07:00
Michael Crosby
f2276206b3 Merge pull request #770 from q384566678/rootfsPropagation-test
config-linux.md: Increase the valid value of rootfsPropagation
2017-04-25 11:18:19 -07:00
Michael Crosby
b5a9eb85b1 Merge pull request #776 from wking/file-link-fix
config-linux: Fix 'file' POSIX link
2017-04-25 11:11:00 -07:00
W. Trevor King
45cd926102 schema/Makefile: Add .PHONY declarations for phony targets
The only non-phony target (where the target name matches the output
file) is 'validate', but we need .PHONY there because the Go
dependencies are not represented in the Makefile.  This commit adds
the missing .PHONY declarations to the other targets, which truly are
phony.

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-04-24 13:47:03 -07:00
Michael Crosby
4754b55de9 Merge pull request #774 from q384566678/makefile-clean
schema: add `clean` to Makefile
2017-04-21 15:30:07 -07:00
W. Trevor King
4c33c9e041 config-linux: Fix 'file' POSIX link
This was broken by f9dc90b0 (make link usage consistent across the
specification, 2017-02-09, #687), which updated the link label, but
not this link.  Now that the link label matches the link text, we can
use the implicit link name shortcut [1].

[1]: https://daringfireball.net/projects/markdown/syntax#link

Signed-off-by: W. Trevor King <wking@tremily.us>
2017-04-21 09:40:45 -07:00
zhouhao
a084798c96 schema: Add enumeration to rootfsPropagation values
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-21 13:29:13 +08:00
zhouhao
9d5ff350b4 config-linux.md: Update the link to the devices
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-04-20 13:38:05 +08:00