Commit Graph

38 Commits

Author SHA1 Message Date
Vincent Batts 7d4fe7380f version: bump to -dev for master
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-06-03 15:47:55 -04:00
Vincent Batts 06479209bd version: v1.0.0-rc1
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-06-03 15:47:55 -04:00
Vincent Batts 831d961964 Merge pull request #397 from cyphar/add-cgroup-namespace
*: add support for cgroup namespace
2016-06-03 13:45:27 -04:00
Vincent Batts eeeecb0f44 Merge pull request #485 from duglin/FixStatus
Add 'status' to state.go
2016-06-03 13:44:40 -04:00
Aleksa Sarai ce19b8d167 *: add support for cgroup namespace
The cgroup namespace is a new kernel feature available in 4.6+ that
allows a container to isolate its cgroup hierarchy. This currently only
allows for hiding information from /proc/self/cgroup, and mounting
cgroupfs as an unprivileged user. In the future, this namespace may
allow for subtree management by a container.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-06-04 00:14:39 +10:00
Doug Davis 9cb0c7fa6c Add annotations to the state json
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-02 13:31:09 -07:00
Doug Davis a93873a099 Add 'status' to state.go
Forgot to do this in previous PR.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-02 13:28:59 -07:00
Michael Holzheu bb287dd5d7 seccomp: Add ppc and s390x to specs-go/config.go
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2016-06-01 11:52:31 -04:00
W. Trevor King 1fa80d2ca6 specs-go/config: Drop platform-independent comment
This has been stale since cb2da543 (config: Single, unified config
file, 2015-12-28, #284), when we dropped the attempt to distinguish
between platform-independent and platform-dependent configuration.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-24 14:18:53 -07:00
Qiang Huang be7676409b Merge pull request #429 from wking/terminal-omitempty
specs-go/config.go: Make Process.Terminal omitempty
2016-05-10 17:23:43 +08:00
Qiang Huang d33a8e17cb Merge pull request #430 from wking/readonly-omitempty
specs-go/config.go: Make Root.Readonly omitempty
2016-05-10 17:21:30 +08:00
W. Trevor King 5c2193f357 specs-go/config: Make Linux and Solaris omitempty
Both fields are optional, so you could conceivably have neither.
However, in most cases folks will populate the one corresponding to
their platform.  The one that *doesn't* match their platform must not
show up, in order to avoid violating the:

  This should only be set if **`platform.os`** is ...

phrasing.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-06 23:58:09 -07:00
W. Trevor King f307cfc939 specs-go/config.go: Make Root.Readonly omitempty
It's an optional setting, and this change will fix the wordy:

  $ ocitools generate --template <(echo '{}')
  $ grep readonly config.json
      "readonly": false,

Instead, config.json will not contain a 'readonly' entry at all.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-06 22:16:10 -07:00
W. Trevor King 41e94ae3d5 specs-go/config.go: Make Process.Terminal omitempty
It's an optional setting, and this change will fix the wordy:

  $ ocitools generate --template <(echo '{}')
  $ grep terminal config.json
      "terminal": false,

Instead, config.json will not contain a 'terminal' entry at all.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-05-06 21:38:23 -07:00
Amit Saha 815ce4e2eb UID and GID for the main process are not optional
The spec requires UID and GID to be specified, so we shouldn't
ignore if they are not specified.

Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2016-05-06 10:41:51 +10:00
Abhijeeth Nuthan 7c9daebaa7 Introducing Solaris in OCI
Signed-off-by: Abhijeeth Nuthan <abhijeeth.nuthan@oracle.com>
2016-05-04 12:19:27 -07:00
W. Trevor King 440fc5b36e specs-go/config: Make Spec.Mounts omitempty (#408)
* specs-go/config: Make Spec.Mounts omitempty

Otherwise:

  $ ocitools generate --mount-cgroups=no --template <(echo {})
  $ grep mounts config.json
          "mounts": null,

The language in config.md#Mounts is:

> You can add array of mount points...

which I think means 'MAY'.

Signed-off-by: W. Trevor King <wking@tremily.us>

* config: Use 'MAY' (RFC 2119) for mounts

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-04-28 09:46:54 -04:00
Mrunal Patel e87d7d2ba9 Fix remnants from SelinuxProcessLabel to SelinuxLabel rename
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-22 13:51:31 -07:00
Mrunal Patel 7350d5e1f1 Add support for Selinux mount context labels
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-22 13:40:49 -07:00
Vincent Batts 54fba081a4 version: bump v0.6.0-dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-12 10:00:37 -04:00
Vincent Batts 78e6667ae2 version: v0.5.0
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-12 10:00:03 -04:00
Michael Crosby adcbe530a9 Add masked and readonly paths
Fixes #320

This adds the maskedPaths and readonlyPaths fields to the spec so that
proper masking and setting of files in /proc can be configured.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-01 10:46:41 -07:00
Michael Crosby 51f8868c30 Remove ffjson because of gccgo issues
Fixes #362

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-31 11:21:45 -07:00
Michael Crosby 0eb138d1d6 Regenerate ffjson for Timeout field
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-23 16:16:13 -07:00
Mrunal Patel e23fbbb408 Merge pull request #346 from crosbymichael/hook-timeout
Add timeout field to hooks
2016-03-18 10:21:31 -07:00
Vincent Batts a306c5841f Merge pull request #343 from crosbymichael/marshal-performance
Improve json encoding performance for specs-go
2016-03-16 21:35:28 -04:00
Michael Crosby 5a3b1816b2 Add timeout field to hooks
So that runtimes don't lock up forever waiting on a hook to return I
added a timeout field.  This allows the author to specify the timeout in
seconds that they want the hook to run before aborting the hook and
container execution.

I think the hook is the proper place to specify a timeouot like this
because any type of overall timeout in the runtime will probably not
work for all hooks and will not be flexable enough.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-16 16:51:29 -07:00
Michael Crosby cfec788d67 Add makefile target for ffjson
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-16 11:30:16 -07:00
Vincent Batts 4d4a07952e Merge pull request #340 from liangchenye/master
add omitempty to 'Devices
2016-03-16 13:27:20 -04:00
Michael Crosby 4e99e8fb89 Use ffjson for faster marshal and unmarshal
By using ffjson for json encoding we can reduce the time for encoding
and decoding.

Without:

BenchmarkMarsalSpec-4     100000             18276 ns/op
BenchmarkUnmarshal-4       30000             55115 ns/op

With:

BenchmarkMarsalSpec-4     100000             13649 ns/op
BenchmarkUnmarshal-4       50000             24747 ns/op

This is a reduces time about 25% on marshal and 50% on unmarshal.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-15 17:30:18 -07:00
Michael Crosby 7a00e0ce5e Add basic marshal tests
This adds basic benchmark tests for the performace of marshaling and
unmarshaling the spec into json.  These tests are helpful to optimize
the performace because the main way the spec is consumed is via json.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-15 17:21:40 -07:00
liangchenye 28cc423977 add omitempty to 'Device' and 'Namespace'
Signed-off-by: liangchenye <liangchenye@huawei.com>
2016-03-11 11:28:58 +08:00
Vincent Batts ab44e373ec version: bump v0.5.0-dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-10 18:54:08 +00:00
Vincent Batts 3ce138b193 version: v0.4.0
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-10 18:54:08 +00:00
Julian Friedman 9d9ed06d5e Move rlimits to process
Signed-off-by: Julian Friedman <julz.friedman@uk.ibm.com>
2016-03-10 09:44:43 +00:00
Vincent Batts 820131db4a *: flatten platform dependent source
This introduces verbiage of fields that may occur in json (technically
optional), but is required on certain platforms (e.g. Linux).

The JSON document will look the same as it presently does, but now the
reference source compiles regardless of platform.

Not adding a "name" string to the user sturct, as that is not a
requirement yet.

In the event a windows runtime shows up, I could imagine an `sid` on the
user struct, but we'll get to that when it happens.

Closes https://github.com/opencontainers/specs/pull/135
Related to https://github.com/opencontainers/specs/issues/166

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-09 15:12:17 -05:00
W. Trevor King 59333dcf45 specs-go/config: Fix 'SelinuxProcessLabel' -> 'SelinuxLabel'
The label changed in 5a8a779f (Move process specific settings to
process, 2016-03-02, #329) and 7bf06d53 (source and schema:
differentiate with examples, 2015-12-18, #276) missed this instance
when rebasing around #329.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-03-09 12:00:51 -08:00
Vincent Batts 7bf06d53dd source and schema: differentiate with examples
The standard is on the JSON schema (not yet IETF spec JSON-schema), such
that it is not implemenations specific. Thus far, the reference has been
in how golang source renders the JSON documents.

Having the JSON source and the markdown documents in sync has been an
ongoing step to keep in sync.

Separating these two allows the golang source to continue being _a_
reference, but the JSON schema in the documentation to be _the_
reference.

As validation tooling is refined, then it will facilitate ensuring
the available golang source conforms to the reference JSON.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-09 19:18:20 +00:00