Commit Graph

3094 Commits

Author SHA1 Message Date
Michael Crosby
b1eb1103a8 Add section for state dir
Closes #1286

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-11 16:54:42 -04:00
Phil Estes
edc51c86f2 Merge pull request #1342 from mlaventure/is-serving-failfast
Disable FailFast on client.IsServing()
2017-08-11 16:47:48 -04:00
Michael Crosby
f2ee71c56c Merge pull request #1339 from dmcgowan/refactor-oci-package
Remove oci package
2017-08-11 16:32:42 -04:00
Kenfe-Mickael Laventure
fed5ad4bc5
Update tests to properly use IsServing
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 13:13:13 -07:00
Kenfe-Mickael Laventure
7de9ca519c
Disable FailFast on client.IsServing()
User of the client should associate a proper timeout with the context
instead.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 13:13:13 -07:00
Christopher Jones
661bcd3e4d
Change test image based on platform
This changes testImage so it can be run on other platforms.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-08-11 14:48:14 -04:00
Derek McGowan
a437d140f8
Remove oci package
Replace functionality in client with simple tar writer

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-11 11:48:14 -07:00
Phil Estes
a6be9f544d Merge pull request #1338 from mlaventure/client-reconnect-fix
Client reconnect fix
2017-08-11 14:30:05 -04:00
Kenfe-Mickael Laventure
5f36ac2093
Add test to ensure we can access tasks on restart
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 09:34:29 -07:00
Kenfe-Mickael Laventure
e661be6a9c
Fix failure to connect to shim on daemon restart
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 09:34:29 -07:00
Kenfe-Mickael Laventure
7ac351cdfe
Share Dialer and DialAddress between client and shim
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 09:34:29 -07:00
Kenfe-Mickael Laventure
587a811d09
Check credentials when connecting to shim
NewUnixSocketCredentials was actually never invoked before.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 09:34:29 -07:00
Kenfe-Mickael Laventure
24aac336f3
Update unix dialer to keep retrying if socket is gone
This is needed to support daemon restart as the unix socket is recreated at
every start.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-11 09:34:15 -07:00
Michael Crosby
bb4432412f Merge pull request #1331 from crosbymichael/stress
Add stress test tool
2017-08-11 11:21:44 -04:00
Michael Crosby
f27f8dd120 Merge pull request #1320 from crosbymichael/cr-race
Fix race with task checkpoint
2017-08-11 10:30:51 -04:00
Michael Crosby
c7f04ce0de Merge pull request #1310 from stevvooe/releases
RELEASES: define the release process
2017-08-11 10:28:37 -04:00
Stephen J Day
9827b4c1e5
RELEASES: define the release process
Define the release process for containerd and outline the components
that are and are not covered by versioning guarantees. Please read the
document for details.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-10 18:27:07 -07:00
Stephen Day
56d499e114 Merge pull request #1335 from stevvooe/alpha4
release: prepare for 1.0.0-alpha4
2017-08-10 15:18:14 -07:00
Stephen J Day
875672ef86 release: prepare for 1.0.0-alpha4
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-10 15:04:17 -07:00
Michael Crosby
d513dd2bfd Fix race with task checkpoint
Because runc will delete a container after a successful checkpoint we
need to handle a NotFound error from runc on delete.

There is also a race between SIGKILL'ing the shim and it actually
exiting to unmount the tasks rootfs, we need to loop and wait for the
task to actually be reaped before trying to delete the rootfs+bundle.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 16:35:03 -04:00
Michael Crosby
fd75f1e52f Add stress test tool
This adds a `stress` binary to help stress test containerd.  It is
different from a benchmarking tool as it only gives a simple summary at
the end.

It is built to run long, multi hour/day stress tests across builds of
containerd.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 15:46:10 -04:00
Derek McGowan
70c2d367db Merge pull request #1328 from crosbymichael/ctr-runtime
Set runtime on container from ctr
2017-08-10 11:22:35 -07:00
Michael Crosby
a888587cc4 Set runtime on container from ctr
Set the missing `--runtime` flag when using ctr for new containers

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 11:38:36 -04:00
Kenfe-Mickaël Laventure
258c719cbc Merge pull request #1327 from estesp/namespace-doc-fixes
Minor updates to the namespaces doc
2017-08-10 17:25:50 +02:00
Phil Estes
f90fa4e121
Minor updates to the namespaces doc
Add info on labels. Some wording updates.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-08-10 11:08:03 -04:00
Michael Crosby
7ddd6ad92d Merge pull request #1316 from crosbymichael/namespaces
Add namespace doc for containerd
2017-08-10 10:35:28 -04:00
Michael Crosby
7a40eaabe8 Add namespace doc for containerd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 10:22:23 -04:00
Michael Crosby
921b830bc1 Merge pull request #1322 from stevvooe/easy-install
Makefile: simplify installation from tar file
2017-08-10 10:16:35 -04:00
Michael Crosby
17d7a5c65b Merge pull request #1321 from stevvooe/refactor-snapshot-commands
cmd/snapshot: follow conventions from Snapshotter
2017-08-10 10:08:38 -04:00
Michael Crosby
6795406223 Merge pull request #1326 from Random-Liu/fix-typo
Minor typo fix.
2017-08-10 10:01:47 -04:00
Lantao Liu
debd07fc13 Minor typo fix.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-10 06:23:21 +00:00
Stephen J Day
7717eb6feb
Makefile: simplify installation from tar file
By moving the binaries to be rooted at `bin/` in the tar file,
installation can be done from a tar file in one fell swoop:

```console
$ make release
$ sudo tar -C /usr/local -xvf releases/containerd-1.0.0-alpha3-72-ge6ba48f2.m.linux-amd64.tar.gz
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-09 18:35:29 -07:00
Stephen J Day
cea1d337c2
cmd/snapshot: follow conventions from Snapshotter
The argument order, naming and behavior of the snapshots command didn't
really follow any of the design constraints or conventions of the
`Snapshotter` interface. This brings the command into line with that
interface definition.

The `snapshot archive` command has been removed as it requires more
thought on design to correctly emit diffs.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-09 17:22:33 -07:00
Stephen Day
e6ba48f25c Merge pull request #1257 from stevvooe/content-changes
content: remove Provider.Reader
2017-08-09 17:12:44 -07:00
Stephen J Day
8be340e37b
content: remove Provider.Reader
After some analysis, it was found that Content.Reader was generally
redudant to an io.ReaderAt. This change removes `Content.Reader` in
favor of a `Content.ReaderAt`. In general, `ReaderAt` can perform better
over interfaces with indeterminant latency because it avoids remote
state for reads. Where a reader is required, a helper is provided to
convert it into an `io.SectionReader`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-09 14:32:28 -07:00
Phil Estes
f3ff1e223b Merge pull request #1315 from crosbymichael/lchown
Use lchown when remapping rootfs
2017-08-09 11:36:10 -04:00
Michael Crosby
1f6b10b699 Use lchown when remapping rootfs
Use lchown when remapping the container's rootfs as to ensure that the
symlink has the correct permissions but the underlying file that it
points to is not modified.

Remapping on the host can cause host files to change outside of the
rootfs if symlinks are dereferenced.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-09 11:27:46 -04:00
Phil Estes
ef344c14ba Merge pull request #1312 from tklauser/use-x-sys
Use functions from golang.org/x/sys
2017-08-09 10:30:37 -04:00
Tobias Klauser
f2bed8ffb9 Use CopyFileRange from golang.org/x/sys/unix
Use the CopyFileRange and Lsetxattr from golang.org/x/sys/unix instead
of their counterparts from github.com/containerd/continuity/sysx. These
are 1:1 replacements (except for the fd parameter types in
CopyFileRange).

This will eventually allow to remove these functions there as well.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-08-09 13:43:12 +02:00
Tobias Klauser
4a6a2b9db0 Switch from package syscall to golang.org/x/sys
The syscall package is locked down and the comment in [1] advises to
switch code to use the corresponding package from golang.org/x/sys. Do
so and replace usage of package syscall with package
golang.org/x/sys/{unix,windows} where applicable.

  [1] https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24

This will also allow to get updates and fixes for syscall wrappers
without having to use a new go version.

Errno, Signal and SysProcAttr aren't changed as they haven't been
implemented in x/sys/. Stat_t from syscall is used if standard library
packages (e.g. os) require it. syscall.ENOTSUP, syscall.SIGKILL and
syscall.SIGTERM are used for cross-platform files.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-08-09 13:41:16 +02:00
Michael Crosby
29a4dd7f46 Merge pull request #1276 from dmcgowan/snapshot-labels
Snapshot labels
2017-08-08 21:59:28 -04:00
Phil Estes
ee027d4e4b Merge pull request #1309 from crosbymichael/opts-doc
Add doc for extending client opts
2017-08-08 17:33:39 -04:00
Michael Crosby
67572b6370 Merge pull request #1307 from crosbymichael/spec-opts
Add cgroup paths and hostname spec opts
2017-08-08 16:58:04 -04:00
Michael Crosby
bed8df119e Add cgroup paths and hostname spec opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-08 15:52:56 -04:00
Michael Crosby
1907116bdd Add doc for extending client opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-08 15:39:59 -04:00
Michael Crosby
1f04eddad1 Merge pull request #1306 from estesp/error-no-container
Delete command should require at least one container ID
2017-08-08 11:29:56 -04:00
Phil Estes
8ebbd1cdf9
Delete command should require at least one container ID
Also fix help/usage to reveal delete accepts multiple container IDs.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-08-08 11:13:23 -04:00
Phil Estes
42c1c9a990 Merge pull request #1301 from crosbymichael/task-force
Add WithProcessKill DeleteOpt
2017-08-08 10:48:28 -04:00
Michael Crosby
d8c075aadc Add WithProcessKill DeleteOpt
Add an option that allows users for force kill and delete a process/task
when calling `Delete`

Fixes #1274

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-08 10:37:17 -04:00
Michael Crosby
d4be9822ed Merge pull request #1303 from estesp/cleanup-workdir
Fix bundle removal with the reappearance of state dir
2017-08-08 10:19:29 -04:00