Commit Graph

1881 Commits

Author SHA1 Message Date
Derek McGowan
59772ba745 Merge pull request #1128 from crosbymichael/task-id
Add Exec IDs
2017-07-06 15:41:36 -07:00
Michael Crosby
f93bfb6233 Add Exec IDs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 15:23:08 -07:00
Phil Estes
e283b3802d Merge pull request #1133 from crosbymichael/register
add typeurl package for TypeUrl handling for external types
2017-07-06 16:20:57 -04:00
Michael Crosby
4b9a8ee13e Require *T for typeurl interaction
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 13:14:48 -07:00
Michael Crosby
c63b69672e Add typeurl.Is to gate unmarshal
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-05 16:22:17 -07:00
Michael Crosby
448dc0dfa8 Replace events/convert with typeurl
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-05 16:05:49 -07:00
Michael Crosby
a60511d5aa Use typeurl package for spec types
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-05 15:37:26 -07:00
Michael Crosby
f8720382b3 Add typeurl package for TypeUrl registration
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-05 14:36:39 -07:00
Michael Crosby
8e1a04ff9e Merge pull request #1126 from razic/typo-fix
fixes typo in proto comment
2017-07-03 10:58:20 -07:00
Kenfe-Mickaël Laventure
193750e1a5 Merge pull request #1127 from sameo/topic/typo
linux: Make containerd less runc specific
2017-07-03 10:57:37 -07:00
Zachary Adam Kaplan
a28a871d44 fixes typo in comment
Signed-off-by: Zachary Adam Kaplan <razic@viralkitty.com>
2017-07-03 17:48:14 +00:00
Samuel Ortiz
b67398af15 linux: Make containerd less runc specific
We hope that containerd supports any OCI compliant runtime, and not only
runc.
This patch fixes all the error messages to not be completely runc
specific and change the initProcess structure to have its runtime
pointer be called 'runtime' and not 'runc'

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-07-03 17:45:23 +02:00
Michael Crosby
3448c6bafb Merge pull request #1113 from dmcgowan/snapshot-namespaces
Snapshot namespaces
2017-06-30 16:36:40 -07:00
Michael Crosby
2bbd7d213e Merge pull request #1050 from stevvooe/container-filters
cmd/ctr, service/containers: implement container filter
2017-06-30 15:54:14 -07:00
Derek McGowan
8bd8030ede Merge pull request #1123 from tonistiigi/fix-diskusage
fs: fix hardlinks detection on usage calc
2017-06-30 15:48:47 -07:00
Tonis Tiigi
6c11da2880 fs: fix hardlinks detection on usage calc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-30 15:33:08 -07:00
Phil Estes
3456dc6cb8 Merge pull request #1121 from stevvooe/grpc-errors-test
errdefs: add tests error conversions
2017-06-30 17:37:01 -04:00
Michael Crosby
5b9953cebf Merge pull request #1122 from stevvooe/rename-fifoset
containerd: rename FifoSet to FIFOSet
2017-06-30 14:34:36 -07:00
Stephen J Day
d738d6d1e4
containerd: rename FifoSet to FIFOSet
Per Go's style guidelines, `Fifo` should be `FIFO` since it is an
initialism.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-30 14:16:56 -07:00
Stephen J Day
397f405f63
errdefs: add tests error conversions
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-30 11:51:41 -07:00
Stephen J Day
396d89e423
cmd/ctr, service/containers: implement container filter
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-30 11:49:16 -07:00
Phil Estes
3332042ab6 Merge pull request #1117 from AkihiroSuda/fix-root-test
*_test.go: fix test conditions
2017-06-30 12:35:29 -04:00
Kenfe-Mickaël Laventure
e7ba3fb600 Merge pull request #1098 from crosbymichael/ropts
Implement options for runtime specific settings
2017-06-30 08:46:29 -07:00
Akihiro Suda
eeb74d4e23 *_test.go: fix test conditions
- add `testutil.RequiresRoot()` to TestMain
- moved `if testing.Short{ t.Skip() }` from each of the tests into a
common `newClient()`

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-30 04:00:59 +00:00
Stephen Day
8a00710af8 Merge pull request #1120 from crosbymichael/ctdid
Metrics id -> container_id
2017-06-29 17:08:07 -07:00
Michael Crosby
a1eaa6b8c5 Metrics id -> container_id
Make sure we use container id as the id saved in the metrics labels

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 16:23:10 -07:00
Derek McGowan
3db8adc5d7
Update plugin load and snapshot service
Allow plugins to be mapped and returned by their ID.
Add skip plugin to allow plugins to decide whether they should
be loaded.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-29 16:16:26 -07:00
Derek McGowan
5b105f86ce
Fix rootfs error message extra format variable
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-29 16:16:26 -07:00
Derek McGowan
4ba4f3a1d5
Add namespaced snapshotter implementation
The namespaced snapshotter wraps an existing snapshotter and
enforces namespace.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-29 16:16:26 -07:00
Kenfe-Mickael Laventure
ccbe92dc08 Move WithExit to runcopts package
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 15:50:39 -07:00
Michael Crosby
124f430d44 Update base types url for runc opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 15:44:23 -07:00
Michael Crosby
96dbb08ec4 Change runtime options to *Any
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 15:35:13 -07:00
Michael Crosby
72831b6985 Use Any instead of []byte
This allows us to get the fully TypeURL for consuming code.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 15:32:45 -07:00
Michael Crosby
82d0208aaa Implement options for runtime specific settings
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-29 15:32:45 -07:00
Derek McGowan
7ddf411ea8
Revert "snapshot/storage: namespace snapshot drivers"
This reverts commit b1a70aa335.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-29 15:32:07 -07:00
Derek McGowan
eedcbc64cc Merge pull request #1115 from stevvooe/consolidate-errors
errdefs: centralize error handling
2017-06-29 15:18:24 -07:00
Stephen J Day
a4fadc596b
errdefs: centralize error handling
Now that we have most of the services required for use with containerd,
it was found that common patterns were used throughout services. By
defining a central `errdefs` package, we ensure that services will map
errors to and from grpc consistently and cleanly. One can decorate an
error with as much context as necessary, using `pkg/errors` and still
have the error mapped correctly via grpc.

We make a few sacrifices. At this point, the common errors we use across
the repository all map directly to grpc error codes. While this seems
positively crazy, it actually works out quite well. The error conditions
that were specific weren't super necessary and the ones that were
necessary now simply have better context information. We lose the
ability to add new codes, but this constraint may not be a bad thing.

Effectively, as long as one uses the errors defined in `errdefs`, the
error class will be mapped correctly across the grpc boundary and
everything will be good. If you don't use those definitions, the error
maps to "unknown" and the error message is preserved.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-29 15:00:47 -07:00
Stephen Day
fb7f43f1a8 Merge pull request #1118 from AkihiroSuda/fix-integration
Makefile: fix INTEGRATION_PACKAGE
2017-06-29 13:59:46 -07:00
Stephen Day
41273b44e5 Merge pull request #1116 from AkihiroSuda/fix-import
image.go: fix duplicated import
2017-06-29 11:08:25 -07:00
Kenfe-Mickaël Laventure
5486d1ba1e Merge pull request #1114 from crosbymichael/pids
Change ListProcesses to ListPids
2017-06-29 07:50:45 -07:00
Akihiro Suda
2c293429f3 Makefile: fix INTEGRATION_PACKAGE
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-29 06:50:36 +00:00
Akihiro Suda
696e383d21 image.go: fix duplicated import
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-29 06:15:36 +00:00
Michael Crosby
e2d5522435 Change ListProcesses to ListPids
These rpcs only return pids []uint32 so should be named that way in
order to have other rpcs that list Processes such as Exec'd processes.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-28 16:10:41 -07:00
Derek McGowan
55861c1a00 Merge pull request #1112 from crosbymichael/runtime
Move runtime types out of plugins pkg
2017-06-28 15:25:59 -07:00
Stephen Day
917914fcf5 Merge pull request #1108 from stevvooe/adjust-identifier-requirements
identifiers: adjust requirements for identifiers
2017-06-28 12:54:28 -07:00
Stephen J Day
0e34531c58
identifiers: adjust requirements for identifiers
Based on feedback, a few adjustments have been made to the identifier
requirements. Identifiers that have components that start with a number
are now allowed. This violates RFC 1035 but does not do so for dns names
practically. A total length, of 76 characters is now also enforced. This
decision was completely arbitrary but satifies the requirement for a
maximum length. Often, this is used as the maximum length of a line in
editors, so it should be a good choice.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-28 11:29:57 -07:00
Stephen Day
7ec1497a6b Merge pull request #1107 from stevvooe/handle-presence-syntax-correctly
filters: handle presence syntax correctly
2017-06-28 11:07:13 -07:00
Stephen J Day
1921173569 filters: handle presence syntax correctly
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-28 10:56:01 -07:00
Michael Crosby
040558cf81 Remove runtime.Event types
This uses the events service types for runtime events

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-28 10:47:22 -07:00
Michael Crosby
7c8acca29a Move runtime interfaces to runtime package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-28 10:10:59 -07:00