Commit Graph

5275 Commits

Author SHA1 Message Date
Kevin Parsons
cee19d1e6e Change restart delay for Windows service to 15s
Previously we waited for 60 seconds after the service faults to restart
it. However, there isn't much benefit to waiting this long. We expect
15 seconds to be a more reasonable delay.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-29 16:41:27 -07:00
Wei Fu
8a388d6238 leases: support resource management
Add three methods for lease service so that the client can use it to
manage the resource by lease, not just gc.root label. With the following
methods, it is easy for client to maintain their own cache system.

```
 - AddResource(context.Context, Lease, Resource) error
 - RemoveResource(context.Context, Lease, Resource) error
 - ListResources(context.Context, Lease) ([]Resource, error)
```

And the resource is to be

```golang
type Resource {
  ID   string
  Type string
}
```

For the snapshots, the Type field will be formatted by
snapshots/%{type}, like snapshots/overlayfs.

fix: #3295

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-05-29 11:00:32 +08:00
Justin Terry (VM)
ac4485c76a Add support to gRPC errdefs for context cancel/deadline exceeded
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-05-28 17:02:29 -07:00
Derek McGowan
0e7a3c9e51
Merge pull request #3298 from jterry75/sync_tar2ext4_write
Forcibly sync writes on lcow layer.vhd after write
2019-05-24 12:06:27 -07:00
Michael Crosby
d57cf6f151
Merge pull request #3297 from BenTheElder/add-restart
add Restart=always to unit file
2019-05-23 22:09:34 -04:00
Benjamin Elder
bbe45e4467 add Restart=always to unit file
Signed-off-by: Benjamin Elder <bentheelder@google.com>
2019-05-23 15:21:42 -07:00
Phil Estes
01191a21b0
Merge pull request #3299 from Random-Liu/use-mkdirall
Not return error when rootfs already exists
2019-05-23 22:03:55 +02:00
Wei Fu
290fc9eeab
Merge pull request #3301 from dmcgowan/add-run-platform
Fix run with specified platform
2019-05-24 03:22:35 +08:00
Derek McGowan
a274dbe822
Fix run with specified platform
Adds the platform flag to the run command and resolves
the image based on that platform.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-05-23 11:59:33 -07:00
Lantao Liu
48b81e872c Do not return error when rootfs already exists.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-05-22 15:57:19 -07:00
Justin Terry (VM)
e0c4fe4110 Forcibly sync writes on lcow layer.vhd after write
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-05-22 13:31:58 -07:00
Derek McGowan
25daa7355c
Merge pull request #3192 from thaJeztah/bump_grpc_1.19.1
bump google.golang.org/grpc v1.20.1
2019-05-22 11:58:52 -07:00
Derek McGowan
c9c555cd71
Merge pull request #3226 from Ace-Tang/kill_shim_in_clean
runtime-v1: kill shim in exit handler
2019-05-22 11:56:40 -07:00
Derek McGowan
ec0b722083
Merge pull request #3292 from crosbymichael/shim-cgroup
Add shim cgroup support for v2 runtimes
2019-05-22 10:32:47 -07:00
Michael Crosby
b7f093eaa2
Merge pull request #3296 from dmcgowan/fix-export-labels
Use a single custom annotation for export
2019-05-22 09:46:24 -04:00
Derek McGowan
5e2d7efd82
Use a single custom annotation for export
Remove annotation prefix and add multiple index records
for manifests with multiple image names. This makes the
custom annotation more consistent with the OCI image
annotation. Additionally, ensure the OCI image annotation
always represents the tag (partial image name) as recommended
by the specification. The containerd image name annotation
will always contain the full image name.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-05-21 17:21:26 -07:00
Phil Estes
2088fc999c
Merge pull request #3294 from dmcgowan/fix-metadata-panic
Ensure namespaced writer commit has correct namespace
2019-05-22 00:49:40 +02:00
Derek McGowan
30082abed3
Merge pull request #3293 from crosbymichael/atomic-delete
Improve atomic delete
2019-05-21 13:54:47 -07:00
Derek McGowan
41b7b0e0dc
Ensure namespaced writer commit has correct namespace
The namespaced writer Commit method must always have a
namespace in the context as checked by the removeIngestLease
function, resulting in a panic when not provided.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-05-21 11:08:55 -07:00
Michael Crosby
bcb6c8db47
Merge pull request #3279 from mxpv/ttrpc
Add TTRPC client
2019-05-21 12:24:31 -04:00
Maksym Pavlenko
7f79fbb245 Move ttrpc client to pkg/ttrpcutil
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-05-20 16:44:49 -07:00
Ace-Tang
5b7a327c47 Improve atomic delete
skip hidden directories in load task, and return soon if path not exist
in atomicDelete

carry of #3233

Closes #3233

Signed-off-by: Ace-Tang <aceapril@126.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-20 20:13:35 +00:00
Michael Crosby
fe6a2b03ed Add shim cgroup support for v2 runtimes
Closes #3198

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-20 16:04:06 +00:00
Akihiro Suda
cafda1c50f
Merge pull request #3290 from estesp/typo
Fix typo in description comment
2019-05-20 16:32:14 +02:00
Phil Estes
62609d66d0
Fix typo in description comment
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2019-05-20 04:21:39 -04:00
Michael Crosby
90c6c1af43 Pass options on shim create for v2
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-17 21:02:23 +00:00
Phil Estes
b99a66c267
Merge pull request #3288 from Ace-Tang/easy-shim
ctr: make ctr shim command easy to use
2019-05-17 15:40:39 +02:00
Wei Fu
e61f7f4913
Merge pull request #3172 from dmcgowan/export-docker-compatibility
Update image export to support Docker format
2019-05-17 14:30:54 +08:00
Ace-Tang
6907062863 ctr: make ctr shim command easy to use
make ctr shim command easy to use for user, shim socket is generated
through sha256, and it can not get directly, change socket flag to id
command, generated socket in code.
It also avoid fail to connect shim v2, since shim v2 have multiple
containers, `ctr shim --socket state` should specify container id, or
get error `rpc error: code = NotFound desc = container not created: not
found`

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-05-17 11:56:08 +08:00
Michael Crosby
cd5369bace
Merge pull request #2896 from thaJeztah/bump_golang_1.12
Add Golang 1.12.5
2019-05-15 12:30:07 -04:00
Phil Estes
5158bc8de2
Merge pull request #3280 from jterry75/init_state_resize_unused
Remove unused Resize method from initState
2019-05-14 13:18:58 -04:00
Maksym Pavlenko
7b06c9a1ce Add TTRPC client
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-05-13 21:05:07 -07:00
Justin Terry (VM)
5e962dd8ba Remove unused Resize method from initState
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-05-13 12:35:22 -07:00
Michael Crosby
7acdb16882
Merge pull request #3276 from darfux/v1_respect_shim_debug
v1:Respect the `shim_debug` flag when load tasks
2019-05-13 13:02:32 -04:00
Phil Estes
c0d0fc32f5
Merge pull request #3278 from masters-of-cats/pr-bump-ttrpc
Bump ttrpc
2019-05-13 17:51:25 +02:00
Li Yuxuan
66036d9206 v1: Respect the shim_debug flag when load tasks
Currently when we restart containerd it will load all tasks with shim
logs whether the `shim_debug` is set or not.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-05-13 23:51:16 +08:00
Georgi Sabev
a6a888cb5e Bump ttrpc
Co-authored-by: Giuseppe Capizzi <gcapizzi@pivotal.io>
Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com>
2019-05-13 16:21:04 +01:00
Phil Estes
7ad8848663
Merge pull request #3275 from fuweid/me-redirect-shim-v1-output-into-fifo
containerd-shim: redirect output into stdout fifo
2019-05-13 16:16:30 +02:00
Wei Fu
fbb80b9510 containerd-shim: redirect output into stdout fifo
Redirect is used to make sure that containerd still can read the log of
shim after restart.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-05-12 23:03:28 +08:00
Sebastiaan van Stijn
543d1e807f
Add travis_wait to prevent vndr timing out
Pervent travis from timing out because no output was printed;

    No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-10 14:09:57 -07:00
Sebastiaan van Stijn
00bc2f5cfd
Update to Golang 1.12, and prepare for ppc64le
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-10 14:07:32 -07:00
Derek McGowan
bc944553a8
Merge pull request #3206 from Random-Liu/cleanup-after-deadshim-v2
Cleanup dead v2 shim.
2019-05-10 11:56:57 -07:00
Phil Estes
cfbbda910d
Merge pull request #3271 from crosbymichael/info
Faster lookups for listing container metadata
2019-05-10 20:44:43 +02:00
Michael Crosby
67b45aef49 Add WithoutRefreshed metadata
Closes #2566

This provides faster lookups and lists for ctr commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-10 15:16:14 +00:00
Phil Estes
481103c879
Merge pull request #3270 from jcaamano/master
Improve ARM platform matching
2019-05-10 17:02:46 +02:00
Jaime Caamaño Ruiz
ad25c1a9c3 Improve ARM platform matching
This commit improves ARM platform matching in two instances:

* Some old kernels reported the CPU architecture of arm64 cpus as
  Aarch64 [1].
* In cases where the user is running with armv8 cpu and kernel but amrhf
  user land (so armhf containerd), a possibility given the compatibility
  of armv8 with armv7.

[1] https://elixir.bootlin.com/linux/v3.14.29/source/arch/arm64/kernel/setup.c#L420

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
2019-05-10 16:27:20 +02:00
Michael Crosby
bd27bef4ad Move checkpoint and restore commands to new files
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-10 14:20:19 +00:00
Michael Crosby
f80d285079
Merge pull request #3242 from theopenlab/containerd_openlab_ci
Add OpenLab CI configuration for ARM64 build
2019-05-10 10:03:06 -04:00
Michael Crosby
57fbb16234
Merge pull request #3149 from lifubang/pidnamespace
fix killall when use pidnamespace
2019-05-09 14:28:44 -04:00
Michael Crosby
0485499d1c
Merge pull request #3266 from darfux/fix_shim_log_fd_leak
Fix fd leak of shim log
2019-05-09 10:30:53 -04:00