Commit Graph

3094 Commits

Author SHA1 Message Date
Stephen J Day
ea8adf9021
cmd/ctr: show resolved image platform
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-13 12:41:55 -07:00
Phil Estes
37d049d264 Merge pull request #1493 from mikebrow/seccomp-helper
Add seccomp helpers
2017-09-13 12:00:19 -07:00
Derek McGowan
8785f3f002 Merge pull request #1403 from stevvooe/platform-selectors
platforms: define selectors for platforms
2017-09-13 11:50:11 -07:00
Stephen J Day
775f7cea47
platforms: update format for platform specifier
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-13 11:41:45 -07:00
Michael Crosby
77f699ccc7 Update runc to 593914b8bd5448a93f7c3e4902a03408b6d
This bumps runc to the newest version as of this date.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-13 14:24:24 -04:00
Mike Brown
426650f21b adds seccomp helpers
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-09-13 13:11:30 -05:00
Michael Crosby
03b43acd60 Trap close error on shutdown
Fixes #1499

This traps any Accept() errors on server shutdown so that it exits
cleanly.

It also changes gracefulstop to stop on the grpc server as the daemon
will not shutdown if there are connected clients.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-13 13:43:45 -04:00
Michael Crosby
558b46f26e Merge pull request #1502 from crosbymichael/test-image
[tmp] Use amd64 test image
2017-09-13 13:43:19 -04:00
Derek McGowan
0e616f4d7a Merge pull request #1496 from kunalkushwaha/movefile-testcase
Testcase added for Moving files in snapshot layers
2017-09-13 10:41:32 -07:00
Michael Crosby
ca3f16c510 [tmp] Use amd64 test image
This is a workaround because official images were pushed with multi-arch
support recently and the current Pull code is not accounting for this.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-13 13:31:52 -04:00
Kunal Kushwaha
8442e4bbe3 Testcase added for Moving files in snapshot layers
Movement of files/folder from base layer to folder in
new layer should be allowed

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-09-12 10:05:32 +09:00
Michael Crosby
a2aa4ecdc0 Merge pull request #1485 from AkihiroSuda/expose-differ
differ: expose newWalkingDiff() for standalone buildkit
2017-09-11 14:31:16 -04:00
Phil Estes
313cebc578 Merge pull request #1473 from kunalkushwaha/snapshot-testcases
Two Snapshot testcases added
2017-09-11 14:24:44 -04:00
Akihiro Suda
1310c859c7 differ: expose newWalkingDiff() for standalone buildkit
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-09 08:56:11 +00:00
yanxuean
39b5f90b18 Improve server.LoadConfig function
Cann't use the new created config in server.LoadConfig When arg v is nil
fix #1483

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-09-09 11:38:05 +08:00
Stephen J Day
f7d31e2be4
api, metadata: use map type for Container.Extensions
To allow for updating extensions without collisions, we have moved to
using a map type that can be explicitly selected via the field path for
updates. This ensures that multiple parties can operate on their
extensions without stepping on each other's toes or incurring an
inordinate number of round trips.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-08 19:34:26 -07:00
Stephen J Day
94f6be5f10
platforms: implement matcher support
Matching support is now implemented in the platforms package. The
`Parse` function now returns a matcher object that can be used to
match OCI platform specifications. We define this as an interface to
allow the creation of helpers oriented around platform selection.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-08 19:22:29 -07:00
Stephen J Day
fb0688362c
platforms: define selectors for platforms
For supporting selection of images and runtimes in the containerized
world, there is thin support for selecting objects by platform. This
package defines a syntax to display to users that can express specific
platforms in addition to wild cards for matching platforms.

The plan is to extend this to provide support for parsing flag
arguments and displaying platform types for images. This package will
also provide a configurable matcher to allow match of platforms against
arbitrary targets, invariant to the Go compilation.

The internals are based the OCI Image Spec model.

This changeset is being submitted for feedback on the approach before
this gets larger. Specifically, review the unit tests and raise any
concerns.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-08 15:05:21 -07:00
Michael Crosby
52fbc5f03a Merge pull request #1490 from ijc/defalt
Correct spelling of default.
2017-09-08 10:47:55 -04:00
Phil Estes
a791f0442a Merge pull request #1489 from crosbymichael/list-state
Handle locking and errors for process state
2017-09-07 20:03:14 -04:00
Ian Campbell
128aaf6eec Correct spelling of default.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-09-07 23:16:05 +01:00
Brian Goff
3552ce5688 Add field to Container for client-defined data
This field allows a client to store specialized information in the
container metadata rather than having to store this itself and keep
the data in sync with containerd.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-09-07 16:54:47 -04:00
Michael Crosby
951c129bf1 Handle locking and errors for process state
ref: #1464

This tries to solve issues with races around process state.  First it
adds the process mutex around the state call so that any state changes,
deletions, etc will be handled in order.

Second, for IsNoExist errors from the runtime, return a stopped state if
a process has been removed from the underlying OCI runtime but not from
the shim yet.  This shouldn't happen with the lock from above but its
hare to verify this issue.

Third, handle shim disconnections and return an ErrNotFound.

Forth, don't abort returning all tasks if one task is unable to return
its state.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-07 16:22:00 -04:00
Kenfe-Mickaël Laventure
17901fafa0 Merge pull request #1488 from crosbymichael/prom-containers
Add config for exporting container metrics to prom
2017-09-07 13:21:12 -07:00
Michael Crosby
72bcdb8fa9 Add config for exporting container metrics to prom
This adds an option for the cgroups monitor to include container metrics
in the prometheus output.  We will have to use the plugin to emit oom
events via the events service but when the `no_prom` setting is set for
the plugin container metrics will not be included in the prom output.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-07 13:40:55 -04:00
Michael Crosby
aa8bd16ae7 Merge pull request #1487 from crosbymichael/guide
[carry] Improve getting started guide
2017-09-07 11:21:45 -04:00
Michael Crosby
9c207952b0 Add go build and ./main to guide
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-07 11:14:37 -04:00
Roy Inganta Ginting
34a58ce0d4 Improve the getting started guide
Here is list of improvement:
- Add 2 intermediate full samples of code that can be compiled and ran
- Link to Runc.md page for runc installation
- Fix typo at the "Task Wait and Start" section
- Fix missing commands to run sample code at the getting stated guide
- Explicitly State go 1.8.x or above and link back to golang install page

Signed-off-by: Roy Inganta Ginting <ringanta.ginting@gmail.com>
2017-09-07 11:12:37 -04:00
Michael Crosby
2cfd7df257 Merge pull request #1456 from ijc/ctr-list-no-labels
ctr: drop labels from `ctr containers` subcommand list
2017-09-07 11:07:05 -04:00
Akihiro Suda
2f08032924 remotes/docker: add scope (registry:foo/bar:pull)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-07 05:10:48 +00:00
Akihiro Suda
aaae706067 remotes/docker: allow 404 for POST /v2/token
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-07 04:58:44 +00:00
Kunal Kushwaha
b6fb234142 Testcase added for deletion of files in lower layer
Files/folders deleted in lower layer and commited,
 it should not reflect on upper layer

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-09-07 13:34:33 +09:00
Kunal Kushwaha
121d337713 Added testcase Removal of intermediate snapshot
Removal of intermediate snapshot layer must fail.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-09-07 13:31:04 +09:00
Stephen Day
d0457b2213 Merge pull request #1481 from stevvooe/beta0
release: prepare 1.0.0-beta.0
2017-09-06 16:26:13 -07:00
Stephen J Day
a2e89919d9
release: prepare 1.0.0-beta.0
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 16:06:04 -07:00
Stephen Day
3b282ba7b1 Merge pull request #1480 from dmcgowan/unique-unpack-keys
Support simultaneous unpacking of same layer
2017-09-06 16:00:03 -07:00
Derek McGowan
09f24214a6 Merge pull request #1466 from AkihiroSuda/snapshotkey
api: RootFS -> SnapshotKey
2017-09-06 15:46:23 -07:00
Derek McGowan
597d0d76ae
Support simultaneous unpacking of same layer
Prevent unpack failures due to id collision or the need to
wait for another process to finish unpacking. Always attempt
to unpack a layer and handle collisions on commit. Commit
collisions are easily handled as it could be considered the
same as a successful unpack.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-09-06 15:45:31 -07:00
Akihiro Suda
e30e0c8b75
api: RootFS -> SnapshotKey
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 15:22:19 -07:00
Derek McGowan
8b63386924 Merge pull request #1479 from stevvooe/baseline-api-txt
api, linux/runcopts: ensure output is current
2017-09-06 15:14:47 -07:00
Kenfe-Mickaël Laventure
e66d1a7961 Merge pull request #1468 from crosbymichael/stats
Add Metrics endpoint to tasks
2017-09-06 14:59:55 -07:00
Stephen J Day
157cfb1ad2
api, linux/runcopts: ensure output is current
Ensure that the descriptors are re-generated on the CI and block merges
that don't include updates. We also enable the `check-protos` check as
part of this process. The installation process for protobufs has been
fixed to support protobuild.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 14:51:53 -07:00
Michael Crosby
2ed3c62e27 Update cgroups to 5933ab4dc4f7caa3a73a1dc141bd11f4
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-06 16:20:19 -04:00
Michael Crosby
843b35c9f2 Merge pull request #1478 from estesp/freebsd-compile
Fix FreeBSD compilation
2017-09-06 15:03:49 -04:00
Phil Estes
8b938b00bc
Fix FreeBSD compilation
Corrects compile on FreeBSD by handling the lack of ENODATA on FreeBSD.
Since continuity project has already handled this, using their const is
simpler than separating a few extra files in containerd/containerd.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-09-06 14:38:07 -04:00
Derek McGowan
e0f7b5f1bb Merge pull request #1477 from stevvooe/revert-rootfs-init
Revert "rootfs: remove unused functions"
2017-09-06 11:32:32 -07:00
Kenfe-Mickaël Laventure
e1eeb0e0a2 Merge pull request #1475 from dmcgowan/content-commit-context
Add context to content commit
2017-09-06 11:04:31 -07:00
Stephen J Day
4d8f7895e4
Revert "rootfs: remove unused functions"
This reverts commit 4e2337794c.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 11:00:21 -07:00
Derek McGowan
9613acb2ed
Add context to content commit
Content commit is updated to take in a context, allowing
content to be committed within the same context the writer
was in. This is useful when commit may be able to use more
context to complete the action rather than creating its own.
An example of this being useful is for the metadata implementation
of content, having a context allows tests to fully create
content in one database transaction by making use of the context.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-09-06 10:19:12 -07:00
Michael Crosby
bf08f7cd08 Merge pull request #1474 from mlaventure/update-gorunc
Update go-runc to b3c048c028ddd789c6f9510c597f8b9c62f25359
2017-09-06 11:16:23 -04:00