Commit Graph

64 Commits

Author SHA1 Message Date
Stephen J Day
6d0bcd5aec
linux, linux/shim: remove error definitions
Since we now have a common set of error definitions, mapped to existing
error codes, we no longer need the specialized error codes used for
interaction with linux processes. The main issue was that string
matching was being used to map these to useful error codes. With this
change, we use errors defined in the `errdefs` package, which map
cleanly to GRPC error codes and are recoverable on either side of the
request.

The main focus of this PR was in removin these from the shim. We may
need follow ups to ensure error codes are preserved by the `Tasks`
service.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-18 15:56:49 -07:00
Stephen J Day
b385798695
containerd: remove GRPC service export
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-12 16:57:47 -07:00
Michael Crosby
3b8018d8cf Remove protos from Go client API
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-12 14:32:37 -07:00
Derek McGowan
1a49f5ea79 Merge pull request #1167 from crosbymichael/multi-ss
support using multiple snapshotters simultaneously
2017-07-12 13:34:31 -07:00
Akihiro Suda
b06aab713a support using multiple snapshotters simultaneously
e.g. dist pull --snapshotter btrfs ...; ctr run --snapshotter btrfs ...
(empty string defaults for overlayfs)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-12 11:16:12 -07:00
Michael Crosby
cd4e8ba448 Add exec id check on client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-12 10:41:04 -07:00
Michael Crosby
f93bfb6233 Add Exec IDs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 15:23:08 -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
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
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
Michael Crosby
e69423f931 Merge pull request #1079 from crosbymichael/delete
Add DeleteOpts for container deletion
2017-06-23 15:25:36 -07:00
Stephen J Day
12c0daa9c9
api/types: consolidate types package
To simplify use of types, we have consolidate the packages for the mount
and descriptor protobuf types into a single Go package. We also drop the
versioning from the type packages, as these types will remain the same
between versions.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-23 13:50:28 -07:00
Michael Crosby
3b9d9dfa3e Fix error on doulbe Kill calls
This returns a typed error for calls to Kill when the process has
already finished.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-23 13:28:48 -07:00
Michael Crosby
3f45e4369e Add DeleteOpts for container deletion
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-23 11:57:29 -07:00
Stephen J Day
12a6beaeeb
*: update import paths to use versioned services
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-21 18:29:06 -07:00
Michael Crosby
235869eb1f Rename execution service to tasks
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 14:39:25 -07:00
Michael Crosby
94eafaab60 Update GRPC for consistency
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 13:34:24 -07:00
Michael Crosby
6c4a2691b3 Don't delete container with task
Make sure we don't delete a container with a live task

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-15 16:37:50 -07:00
Stephen J Day
27af417668
containerd: allow containers without an image
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-13 11:23:53 -07:00
Michael Crosby
5d1669bcfb Add ctr attach for reattaching to running task
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-09 10:10:39 -07:00
Michael Crosby
4c1af8fdd8 Port ctr to use client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-06 14:53:50 -07:00
Michael Crosby
a8c5542ba8 Add checkpoint and restore to client package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-06 09:58:33 -07:00
Michael Crosby
887a149417 Add terminal support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:46:14 -07:00
Michael Crosby
00734ab04a Return fifo paths from Shim
This allows attach of existing fifos to be done without any information
stored on the client side.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:12:02 -07:00
Michael Crosby
43fb19e01c Add Load for container and Task with Attach
This adds both container and task loading of running tasks as well as
reattaching to the IO of the task after load.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-01 14:12:02 -07:00
Michael Crosby
d0b22290ec Don't require rootfs if not set on container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-25 11:17:36 -07:00
Michael Crosby
a2b0824720 Export GRPC services from client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-25 11:10:34 -07:00
Michael Crosby
608e6daaa4 Make Task, Container, Image interface types
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-25 11:05:58 -07:00
Michael Crosby
1de25c09e3 Add pause resume to task
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-25 10:15:35 -07:00
Michael Crosby
bf9ad0c57f Fix spec generation for task execution
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-24 15:40:40 -07:00
Michael Crosby
3ba06e48ed Add NewTask support to client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-24 14:08:58 -07:00
Michael Crosby
31a3bda41b Add NewContainer and Delete container support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-24 14:08:58 -07:00
Michael Crosby
d0e5732f0b Add initial containerd *Client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-24 14:08:58 -07:00
Michael Crosby
01b9f5ec67 Move Container and runtime to plugin pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-11 15:24:12 -07:00
Phil Estes
91410874e7
Add pause/unpause implementation
This adds pause and unpause to containerd's execution service and the
same commands to the `ctr` client.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-05-06 16:05:37 -04:00
Michael Crosby
a7da08b7ba Add Pty and CloseStdin RPCs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-07 11:20:10 -07:00
Kenfe-Mickael Laventure
c5843b7615 Initial windows runtime work
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-07 09:20:44 -07:00
Michael Crosby
7715ddcefa Add exec APIs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-05 11:51:56 -07:00
Qiang Huang
4764429cbe Add kill API for execution service
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-04-05 09:03:07 +08:00
Michael Crosby
f36feb2ed4 Add prometheus container level metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-22 11:44:25 -07:00
Michael Crosby
ddbeb9f936 Add monitor plugin loading
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-22 11:44:05 -07:00
Michael Crosby
3101be93bc Load runtimes dynamically via go1.8 plugins
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add registration for more subsystems via plugins

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Move content service to separate package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-21 16:29:46 -08:00
Michael Crosby
47ececd6b8 Change Container interface to include Info
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-16 09:59:40 -08:00
Michael Crosby
ab8586b7c5 Remove bundles from API
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-15 13:56:41 -08:00
Kenfe-Mickael Laventure
c857213b4c move work on execution service
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-12-05 14:15:03 -08:00
Michael Crosby
503b068f59 Change base package to containerd from containerkit
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-29 16:08:30 -08:00
Michael Crosby
992fdbfd76 Updates to Root comment
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-07 11:57:14 -08:00
Michael Crosby
788e19d251 Move runtime and Mounts to container config
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-28 15:51:31 -07:00
Michael Crosby
c76f883ccd Finish port of shim package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-05 15:07:20 -07:00
Michael Crosby
5cdaf7f8bb Use interfaces for container creation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-03 15:48:39 -07:00