Commit Graph

8778 Commits

Author SHA1 Message Date
Lantao Liu
7d5ea4401d Send stop signal specified in image config.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-20 21:11:20 +00: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
Lantao Liu
1a9d95244a Merge pull request #81 from Random-Liu/upgrade-containerd
Upgrade containerd to 8ed1e24ae9
2017-06-19 12:59:47 -07: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
Lantao Liu
8524a4ef30 Add schema1 support, and use namespace k8s.io.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-19 18:44:00 +00:00
Lantao Liu
e887ef63d1 Upgrade containerd to 8ed1e24ae9.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-19 18:29:00 +00: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
Lantao Liu
1f3a73d79e Merge pull request #72 from Random-Liu/add-exec-sync
Add ExecSync.
2017-06-16 16:58:50 -07: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
Lantao Liu
9b79201aa5 Add ExecSync.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 22:28:48 +00: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
Lantao Liu
9658159534 Merge pull request #77 from Random-Liu/unmount-dev-shm
Unmount dev shm and cleanup container when stop/remove sandbox
2017-06-16 13:59:47 -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
Lantao Liu
57b8b4358d Update godeps.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 17:19:34 +00:00
Lantao Liu
53367bbd14 Stop/remove all containers when stop/remove sandbox.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 17:19:19 +00:00
Lantao Liu
7f9e0262ad Unmount /dev/shm when stop sandbox.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 17:18:14 +00:00
Lantao Liu
cc43c86f86 Merge pull request #78 from Random-Liu/switch-to-new-containerd-client
Switch to new containerd api
2017-06-16 09:56:54 -07:00
Lantao Liu
d6435996e2 Use new Kill task api.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 16:43:13 +00:00
Lantao Liu
5b7cbf1bc6 Create/remove sandbox container.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 16:43:13 +00:00
Lantao Liu
cb9e104cf1 Create/delete containerd containerd
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 16:43:13 +00:00
Lantao Liu
6ca9c65578 Rename more container to task.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 02:34:43 +00:00
Lantao Liu
bad279e0f6 Finish snapshot support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 02:34:43 +00: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
Mike Brown
484a326717 modify code to compile on updated containerd
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-06-15 23:14:21 +00:00
Mike Brown
67e884e6cf update containerd to 4ae34cccc5.
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-06-15 23:14:21 +00:00