Commit Graph

2903 Commits

Author SHA1 Message Date
Stephen J Day
7f4c4aecf7
images, containers: converge metadata API conventions
The primary feature we get with this PR is support for filters and
labels on the image metadata store. In the process of doing this, the
conventions for the API have been converged between containers and
images, providing a model for other services.

With images, `Put` (renamed to `Update` briefly) has been split into a
`Create` and `Update`, allowing one to control the behavior around these
operations. `Update` now includes support for masking fields at the
datastore-level across both the containers and image service. Filters
are now just string values to interpreted directly within the data
store. This should allow for some interesting future use cases in which
the datastore might use the syntax for more efficient query paths.

The containers service has been updated to follow these conventions as
closely as possible.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-11 10:45:12 -07:00
Derek McGowan
54e2b9db57 Merge pull request #1152 from ijc/drop-unused-variable
linux: Drop unused variable `c` by discarding unused assignment
2017-07-11 09:40:15 -07:00
Derek McGowan
7ffa9ddefc Merge pull request #1153 from darkowlzz/1082-snapshot-prepare
cmd/ctr: add prepare subcommand to snapshot
2017-07-11 09:37:04 -07:00
Sunny Gogoi
2c1b54f573 cmd/ctr: add prepare subcommand to snapshot
This changeset adds `prepare` subcommand to `ctr snapshot` and removes
`prepare` from `dist rootfs` to keep the basic snapshot operation commands
together.

Signed-off-by: Sunny Gogoi <me@darkowlzz.space>
2017-07-11 21:30:40 +05:30
Phil Estes
6c21d7ea5b Merge pull request #1103 from AkihiroSuda/fix-testsuite
checkSnapshotterBasic: fix umount
2017-07-11 08:46:01 -04:00
Ian Campbell
0a580cbb72 linux: Drop unused variable c by discarding unused assignment
The compiler doesn't spot this, but guru does.

This seems to have become unused in 79e6a93624 ("Fix incorrect reference to
the gRPC runtime name as a binary").

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-11 13:28:59 +01:00
Akihiro Suda
60e1557b21 checkSnapshotterBasic: fix umount
The "nextnext" snapshot is being removed at the end of the function.
So umount is needed before removing the snapshot.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-11 08:05:21 +00:00
Kenfe-Mickaël Laventure
13f90e95a7 Merge pull request #1145 from crosbymichael/event-push
Implement Events Push via Service
2017-07-11 08:53:26 +02:00
Michael Crosby
3707703a69 Merge pull request #1149 from tonistiigi/public-differ
differ: make basediff constructor public
2017-07-10 15:30:56 -07:00
Tonis Tiigi
3c49320b1b differ: make basediff constructor public
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-10 15:22:37 -07:00
Phil Estes
34f7b29120 Merge pull request #1143 from crosbymichael/deps
Update containerd dependencies
2017-07-10 16:04:01 -04:00
Michael Crosby
d46b562043 Update containerd dependencies
sys/unix
cgroups
go-runc
console

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-10 11:05:51 -07:00
Michael Crosby
bc6095d0dd Merge pull request #1146 from darkowlzz/1092-ctr-info-output-fix
cmd/ctr: info marshal Container proto struct
2017-07-10 10:08:54 -07:00
Kenfe-Mickaël Laventure
0286739292 Merge pull request #1144 from darrenstahlmsft/distDefaultAddress
Set dist default address to containerd.DefaultAddress
2017-07-10 09:01:40 +02:00
Sunny Gogoi
99461053f3 cmd/ctr: info marshal Container proto struct
Marshaling Container interface resulted in empty json. Use Container proto
struct to get proper container attributes.

Signed-off-by: Sunny Gogoi <me@darkowlzz.space>
2017-07-09 18:20:21 +05:30
Michael Crosby
6578565216 Use event service post for shim events
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-07 16:30:57 -07:00
Darren Stahl
1e7c47d517 Set dist default address to containerd.DefaultAddress
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-07-07 15:18:05 -07:00
Michael Crosby
f39693eabe Add Post to events service
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-07 14:23:10 -07:00
Stephen Day
b9fb2793a8 Merge pull request #1142 from ijc/error-formatting
Adding missing arguments to Wrapf
2017-07-07 11:09:06 -07:00
Ian Campbell
89c3e0141e Adding missing arguments to Wrapf
I noticed some "%q!!missing!!" in my logs and found:

$ git grep 'f(.*, ".*%q.*")'
metadata/containers.go:         return containers.Container{}, errors.Wrapf(errdefs.ErrNotFound, "bucket name %q")
metadata/containers.go:                 err = errors.Wrapf(errdefs.ErrAlreadyExists, "content %q")
metadata/namespaces.go:                 return errors.Wrapf(errdefs.ErrAlreadyExists, "namespace %q")

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-07 16:00:19 +01:00
Kenfe-Mickaël Laventure
5f19850f0f Merge pull request #1135 from crosbymichael/exe-mod
Rename ctx module execuiton->tasks
2017-07-07 11:13:39 +02:00
Michael Crosby
b82107db87 Rename ctx module execuiton->tasks
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 15:51:54 -07:00
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