Commit Graph

2903 Commits

Author SHA1 Message Date
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
Phil Estes
bd25543f5a Merge pull request #1109 from AkihiroSuda/fix-test
container_test.go: fix compilation failure
2017-06-28 10:11:46 -04:00
Akihiro Suda
3d981335e3 container_test.go: fix compilation failure
# github.com/containerd/containerd
  ./container_test.go:769: cannot use &limit (type *uint64) as type *int64 in field value
  ./container_test.go:812: cannot use &limit (type *uint64) as type *int64 in field value

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-28 04:43:01 +00:00
Derek McGowan
a5fa3bb923 Merge pull request #1100 from crosbymichael/update-task
Implement task update
2017-06-27 14:39:45 -07:00
Stephen Day
7d6e40ef8b Merge pull request #1106 from crosbymichael/updates
Update dependencies and add namespace to container metrics
2017-06-27 14:34:31 -07:00
Michael Crosby
cfcea71ab0 Update windows and darwin for spec changes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 13:20:55 -07:00
Michael Crosby
6ec84ef83c Add namespace to container metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 11:54:14 -07:00
Michael Crosby
85f61f6f51 Move cgroups prom to containerd metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 11:45:05 -07:00
Michael Crosby
49f9dc494f Update runc and runtime-spec dependencies
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-27 11:44:38 -07:00
Michael Crosby
f3b85a91b0 Merge pull request #1101 from estesp/invalid-runtime-command
Fix incorrect reference to the gRPC runtime name as a binary
2017-06-26 16:59:18 -07:00
Phil Estes
79e6a93624
Fix incorrect reference to the gRPC runtime name as a binary
Until we have a way to preserve the initial command used to start the
container, we have to default to the default `runc` found on the $PATH.
This code after the last refactor of shim/API is incorrectly using the
gRPC object reference of the v1 runtime as a binary name which causes
os.Exec() errors.

Signed-off-by: Phil Estes <estesp@gmail.com>
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-06-26 19:49:09 -04:00
Michael Crosby
f36e0193a4 Implement task update
This allows tasks to have their resources updated as they are running.

Fixes #1067

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-26 16:38:49 -07:00
Michael Crosby
1f478be14d Merge pull request #1099 from dmcgowan/fix-ctr-delete-snapshot
Fix ctr delete to remove snapshot
2017-06-26 14:37:31 -07:00
Derek McGowan
fe91b9c5cf Merge pull request #1096 from crosbymichael/connect-opts
Add NewWithGRPCOpts to specify grpc dial opts
2017-06-26 13:54:30 -07:00
Derek McGowan
7f9910d04e
Fix ctr delete to remove snapshot
Fix the behavior of removing snapshot on container delete.
Adds a flag to keep the snapshot if desired.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-26 13:38:08 -07:00
Michael Crosby
31322f9fbb Merge pull request #1097 from dmcgowan/fix-dev-report
Fix sublist in dev report
2017-06-26 12:46:53 -07:00
Derek McGowan
21b0f1e285
Fix sublist in dev report
Also clean up some typos

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-26 10:58:05 -07:00
Michael Crosby
a962ac9909 Merge pull request #1090 from kunalkushwaha/runtime-name-fix
Runtime name printed correctly for containers listing.
2017-06-26 10:34:43 -07:00
Michael Crosby
3508e135e6 Add NewWithGRPCOpts to specify grpc dial opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-26 10:31:23 -07:00
Michael Crosby
e2b5ef5f3d Merge pull request #1085 from dmcgowan/dev-report-6-23-2017
Add dev report for June 23, 2017
2017-06-26 09:54:50 -07:00
Kunal Kushwaha
16b10bb55d Runtime name printed correctly.
Runtime is not printed while container listing due to typo introduced
in #935.
This fixes the Typo.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-06-26 11:46:32 +09:00
Michael Crosby
65f171a39f Merge pull request #993 from mlaventure/abstract-namespace
containerd-shim: Use abstract namespace for shim socket
2017-06-25 11:39:00 -07:00
Kenfe-Mickaël Laventure
cd7bbf2afe Merge pull request #1083 from stevvooe/common-identifiers
identifiers: use common package for identifier validation
2017-06-23 18:29:01 -07:00
Kenfe-Mickael Laventure
de632b1084
ctr: add remove subcommand to snapshot
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 18:24:46 -07:00
Kenfe-Mickael Laventure
5a02ae929c
ctr: Properly delete snapshot if run is called with --rm
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 18:01:01 -07:00
Kenfe-Mickael Laventure
6574055dec
linux: Pass correct type when emitting RuntimeDelete event
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 17:55:23 -07:00
Kenfe-Mickael Laventure
28b7aa5355
Use log package instead of logrus in eventSink.Write
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 17:51:57 -07:00
Kenfe-Mickael Laventure
f8d3cfbc60
containerd: Do not fail on plugin failure
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 17:51:57 -07:00
Kenfe-Mickael Laventure
b7f37e778c
containerd-shim: Do not crash when receiving RPC before a Create() is issued
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-23 17:51:57 -07:00