Commit Graph

2903 Commits

Author SHA1 Message Date
Michael Crosby
235869eb1f Rename execution service to tasks
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 14:39:25 -07:00
Stephen Day
6fbe4bd568 Merge pull request #1040 from crosbymichael/api-review
Update GRPC APIs for consistency post review
2017-06-21 14:18:32 -07:00
Michael Crosby
8b2cf6e8e6 Fix Wait() on process/tasks
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 13:48:24 -07:00
Michael Crosby
8830866eed Remove events from Runtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 13:34:24 -07:00
Evan Hazlett
0b06fa8518 use event service for task wait
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-21 13:34:24 -07:00
Evan Hazlett
440fc06041 add event service to client
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-06-21 13:34:24 -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
Derek McGowan
13e7d3c393 Merge pull request #1045 from tonistiigi/err-fix
Fix store errors build conflict
2017-06-21 13:06:35 -07:00
Tonis Tiigi
82464fe949 Fix store errors build conflict
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-21 12:49:33 -07:00
Michael Crosby
ca2ec3e33c Merge pull request #992 from estesp/errrbody-likes-errrrors
Use error interfaces for content/metadata
2017-06-21 11:55:11 -07:00
Phil Estes
ac4c2ab35b Merge pull request #1043 from dmcgowan/dist-remove-grpc-connect
Clean up dist tool to use containerd client
2017-06-21 14:35:12 -04:00
Derek McGowan
6c498c61eb
Clean up dist tool to use containerd client
Remove direct use of grpc in dist tool

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-06-21 11:26:02 -07:00
Michael Crosby
3cdd7a9153 Merge pull request #1042 from mlaventure/fix-var-names
Rename variables holding a task from `c` to `t`
2017-06-21 10:21:18 -07:00
Phil Estes
ad0c8a04f0 Merge pull request #1039 from stevvooe/filter-syntax
filters: clean up implementation
2017-06-21 12:44:10 -04:00
Kenfe-Mickael Laventure
fb5a3d2989
Rename variables holding a task from c to t
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-21 09:26:50 -07:00
Kenfe-Mickaël Laventure
725b4d5803 Merge pull request #1007 from dmcgowan/with-block-fast-fail
Add with block and fail on non-temp dial error
2017-06-21 09:04:40 -07:00
Kunal Kushwaha
a0f73ae229 Container list and Task List printed separately.
Fix for #914

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-06-21 10:26:49 +09:00
Stephen J Day
3d5ee9e8b8
filters: clean up implementation
Address a few cleanup items in the parser. Currently, we don't handle
compound values and we remove a panic when part of the input is not
consumed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-20 18:02:52 -07:00
Michael Crosby
80656bf8ca Merge pull request #1034 from crosbymichael/readme
Update readme
2017-06-20 13:45:26 -07:00
Michael Crosby
58367550e2 Merge pull request #1036 from crosbymichael/client-addr
Add DefaultAddress to client
2017-06-20 13:39:48 -07:00
Michael Crosby
9efe341f8e Add DefaultAddress to client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-20 13:34:37 -07:00
Michael Crosby
ebf4620206 Merge pull request #995 from stevvooe/filter-syntax
filters: add package for filter syntax
2017-06-20 13:31:52 -07:00
Michael Crosby
f3d9aae6e9 Merge pull request #956 from ehazlett/events-service
Events Service
2017-06-20 13:23:19 -07:00
Michael Crosby
de10f7c467 Update readme
This moves the scope table out into a separate doc and adds a few
examples to the readme to show the feature set of containerd.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-20 13:19:53 -07:00
Evan Hazlett
ab4181649b events: be nice to Sprintf
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-06-20 16:17:22 -04:00
Kenfe-Mickaël Laventure
ff2ceec224 Merge pull request #1019 from crosbymichael/delete-running
Don't delete container with task
2017-06-20 13:14:16 -07:00
Stephen J Day
d69ef98bfd
filters: add package for filter syntax
With this PR, we add the syntax to use for filtration of items over the
containerd API. This package defines a syntax and parser that can be
used across types and use cases in a uniform manner.

The syntax is fairly familiar, if you've used container ecosystem
projects.  At the core, we base it on the concept of protobuf field
paths, augmenting with the ability to quote portions of the field path
to match arbitrary labels. These "selectors" come in the following
syntax:

```
<fieldpath>[<operator><value>]
```

A basic example is as follows:

```
name=foo
```

This would match all objects that have a field `name` with the value
`foo`. If we only want to test if the field is present, we can omit the
operator. This is most useful for matching labels in containerd. The
following will match objects that has the field labels and have the
label "foo" defined:

```
labels.foo
```

We also allow for quoting of parts of the field path to allow matching
of arbitrary items:

```
labels."very complex label"==something
```

We also define `!=` and `~=` as operators. The `!=` operator will match
all objects that don't match the value for a field and `~=` will compile
the target value as a regular expression and match the field value
against that.

Selectors can be combined using a comma, such that the resulting
selector will require all selectors are matched for the object to match.
The following example will match objects that are named `foo` and have
the label `bar`:

```
name==foo,labels.bar
```

This filter syntax will be used across all APIs that allow listing of
objects and for filtering which event a cleint see. By using a common
syntax, we hope to keep API access uniform.

For the most part, this takes inspiration from docker, swarm and k8s,
but has the limitation that it only allows selection of an inner
product. We may expand to operators that implement `or`, `in` or
`notin`, but it is not clear that this is useful at this level of the
stack.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-20 13:03:35 -07:00
Michael Crosby
01dcdf213b Merge pull request #1027 from crosbymichael/reaper-lock
Handle start process errors in reaper
2017-06-20 10:42:20 -07:00
Phil Estes
966ceb2c9a Merge pull request #1028 from crosbymichael/content-codes
Don't log AlreadyExists errors
2017-06-20 13:32:49 -04:00
Michael Crosby
9ea7e47e78 Merge pull request #1030 from stevvooe/calculate-correct-image-size
images: calculate size using ChildrenHandler
2017-06-20 10:26:40 -07:00
Evan Hazlett
935645b03a events: add protos
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: update events package to include emitter and use envelope proto

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: add events service

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: enable events service and update ctr events to use events service

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

event listeners

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: helper func for emitting in services

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: improved cli for containers and tasks

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

create event envelope with poster

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: introspect event data to use for type url

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: use pb encoding; add event types

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: instrument content and snapshot services with events

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: instrument image service with events

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: instrument namespace service with events

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: add namespace support

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: only send events from namespace requested from client

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

events: switch to go-events for broadcasting

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-06-20 10:47:28 -04:00
Michael Crosby
100b93ea46 Merge pull request #1029 from sameo/topic/typo
plugin: Fix runtime interface documentation
2017-06-19 12:05:16 -07:00
Michael Crosby
fc3d1161d0 Merge pull request #1023 from samuelkarp/with-namespace
containerd: Add WithLinuxNamespace to replace namespace
2017-06-19 12:03:54 -07:00
Samuel Karp
15c6e832aa containerd: Add WithNamespace to replace namespace
Signed-off-by: Samuel Karp <skarp@amazon.com>
2017-06-19 11:22:26 -07:00
Stephen J Day
549394b135
images: calculate size using ChildrenHandler
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-19 11:05:15 -07:00
Samuel Ortiz
ddea395572 plugin: Fix runtime interface documentation
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-06-19 18:47:26 +02:00
Michael Crosby
60c08fa386 Don't log AlreadyExists errors
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-16 16:39:52 -07:00
Michael Crosby
ecbc779209 Handle start process errors in reaper
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-16 16:03:13 -07:00
Michael Crosby
7e3b7dead6 Merge pull request #1022 from stevvooe/add-pull-support-for-manifest-list
image: add support for pulling manifest lists/oci indexes
2017-06-16 15:29:28 -07:00
Michael Crosby
e4dd5ce835 Merge pull request #1024 from stevvooe/correctly-flushing
cmd/{dist, ctr}: cleanup flushing and alignment
2017-06-16 15:03:57 -07:00
Stephen J Day
5a124794ae
image: add support for pulling manifest lists/oci indexes
This PR ensures that we can pull images with manifest lists, aka OCI
indexes. After this change, when pulling such an image, the resources
will all be available for creating the image.

Further support is required to do platform based selection for rootfs
creation, so such images may not yet be runnable. This is mostly useful
for checkpoint transfers, which use an OCI index for assembling the
component set.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-16 14:59:35 -07:00
Stephen J Day
5d13f8027c
cmd/{dist, ctr}: cleanup flushing and alignment
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-16 14:49:48 -07:00
Michael Crosby
4f20689d37 Merge pull request #1020 from chanezon/master
retrying pr for website to satify cncf guidelines
2017-06-16 14:39:25 -07:00
Patrick Chanezon
16f04383ae retrying pr for website to satify cncf guidelines
Signed-off-by: Patrick Chanezon <patlist@chanezon.com>

fixing validation issue for whitespace

Signed-off-by: Patrick Chanezon <patlist@chanezon.com>
2017-06-16 14:30:31 -07:00
Stephen Day
b4b16a1d45 Merge pull request #1016 from crosbymichael/servicefile
Add containerd unit file
2017-06-16 14:30:20 -07:00
Stephen Day
751bd54c89 Merge pull request #1021 from crosbymichael/with-image
Set image on rootfs options
2017-06-16 14:12:17 -07:00
Michael Crosby
0bc86860f0 Add containerd unit file
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-16 14:05:16 -07:00
Michael Crosby
79631498af Set image on rootfs options
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-16 13:51:24 -07:00
Michael Crosby
d922f48735 Merge pull request #1006 from dmcgowan/content-writer-exists
Content store writer checks expected
2017-06-16 13:29:07 -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