Commit Graph

8778 Commits

Author SHA1 Message Date
Lantao Liu
81ca274c6f Add wildcard mirror support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-13 12:02:57 -07:00
Michael Crosby
2e8ea9fd6b Allow timeouts to be configured in config
This adds a singleton `timeout` package that will allow services and user
to configure timeouts in the daemon.  When a service wants to use a
timeout, it should declare a const and register it's default value
inside an `init()` function for that package.  When the default config
is generated, we can use the `timeout` package to provide the available
timeout keys so that a user knows that they can configure.

These show up in the config as follows:

```toml
[timeouts]
  "io.containerd.timeout.shim.cleanup" = 5
  "io.containerd.timeout.shim.load" = 5
  "io.containerd.timeout.shim.shutdown" = 3
  "io.containerd.timeout.task.state" = 2

```

Timeouts in the config are specified in seconds.

Timeouts are very hard to get right and giving this power to the user to
configure things is a huge improvement.  Machines can be faster and
slower and depending on the CPU or load of the machine, a timeout may
need to be adjusted.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-13 17:36:32 +00:00
Phil Estes
b77e25dade
Merge pull request #3516 from crosbymichael/remote-enc
Remove encryption code from containerd core
2019-08-13 10:52:48 -04:00
Phil Estes
95277fa447
Merge pull request #3524 from ethan-daocloud/patch-2
blkio.go: correct help message word spells.
2019-08-13 10:51:36 -04:00
ethan
a80db38c33 blkio.go: correct help message word spells.
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-13 09:41:25 +08:00
Phil Estes
ec0c968215
Merge pull request #3520 from dmcgowan/image-usage
Add image usage function to client
2019-08-12 18:01:15 -04:00
Michael Crosby
f6504149e5
Merge pull request #3519 from thaJeztah/bump_boltdb
bump go.etcd.io/bbolt v1.3.3
2019-08-12 13:53:51 -04:00
Michael Crosby
cdc58b7976
Merge pull request #3526 from carlosedp/riscv64
bump x/sys to fix riscv64 epoll
2019-08-12 12:01:30 -04:00
Phil Estes
e64ce76b13
Merge pull request #3523 from thaJeztah/bump_golang
AppVeyor: update to go 1.12.7
2019-08-12 11:24:33 -04:00
CarlosEDP
3ef26cd87c bump x/sys to fix riscv64 epoll
Signed-off-by: CarlosEDP <me@carlosedp.com>
2019-08-12 11:43:53 -03:00
Sebastiaan van Stijn
2ff7183cc2
AppVeyor: update to go 1.12.7
Use the latest Go release for testing on AppVeyor

> go1.12.7 (released 2019/07/08) includes fixes to cgo, the compiler,
> and the linker. See the Go 1.12.7 milestone on our issue tracker for details:
>
> https://github.com/golang/go/issues?q=milestone%3AGo1.12.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-12 09:57:02 +02:00
Lantao Liu
8021850e91
Merge pull request #1233 from AkihiroSuda/allow-ca-without-client-certs
allow non-mutual TLS
2019-08-11 17:07:57 -07:00
Lantao Liu
a4b145adbb
Merge pull request #1234 from Random-Liu/update-containerd-to-fix-race
Update containerd to fix panic caused by race condition.
2019-08-11 16:51:56 -07:00
Lantao Liu
7f330dc4aa Update containerd to fix panic caused by race condition.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-10 10:40:43 -07:00
Lantao Liu
fd6c732cd7
Merge pull request #1232 from Random-Liu/avoid-schema1-roundtrip
Remove extra roundtrip for checking schema1.
2019-08-10 10:25:46 -07:00
Lantao Liu
f1fbdbfab7
Merge pull request #1231 from Random-Liu/consider-endpoint-path-for-default
Consider endpoint path when checking default host.
2019-08-10 10:23:49 -07:00
Akihiro Suda
28e492fce0 allow non-mutual TLS
Previously, client keypair had needed to be specified even when unused.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-08-10 21:48:03 +09:00
Lantao Liu
d64fa3b6b8 Remove extra roundtrip for checking schema1.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 18:47:40 -07:00
Lantao Liu
005f9f7378 Consider endpoint path when checking default host.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 18:22:08 -07:00
Lantao Liu
a7481289bb
Merge pull request #1227 from Random-Liu/new-registry-mirror
New registry mirror
2019-08-09 16:24:38 -07:00
Derek McGowan
c017e0efed
Use a child context for errgroup in dispatch
Prevent an errgroup error from causing the acquire to
return a cancellation error. Previously any error
from the errgroup would cause the Dispatch to always
return the cancelled error.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-09 16:01:23 -07:00
Derek McGowan
75771c4634
Add usage function to client
The usage function allows more configurable and accurate calculations
of the usage for an image.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-09 15:46:22 -07:00
Lantao Liu
2fd69f0b78 Move config validation into pkg/config and add unit test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 14:39:30 -07:00
Lantao Liu
53e94c6753 Use containerd registry mirror library.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 14:39:30 -07:00
Sebastiaan van Stijn
b6fca48fed
bump go.etcd.io/bbolt v1.3.3
this brings the dependency back to a released version:

- go.etcd.io/bbolt 2eb7227ade...v1.3.3
  - etcd-io/bbolt#153 fix rollback panic bug
    - fixes etcd-io/bbolt#152 Panic (index out of range) on writeable tx rollback with db.NoFreelistSync

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-09 22:56:54 +02:00
Michael Crosby
ea13c9fe99
Merge pull request #3518 from crosbymichael/processors
Add docs for stream processors
2019-08-09 15:07:15 -04:00
Michael Crosby
0dadef19cf Add docs for stream processors
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-09 18:40:43 +00:00
Lantao Liu
27de1a5862 Update containerd to 5222236c1b.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 10:41:46 -07:00
Michael Crosby
d085d9b464 Remove encryption code from containerd core
We are separating out the encryption code and have designed a few new
interfaces and APIs for processing content streams.  This keep the core
clean of encryption code but enables not only encryption but support of
multiple content types ( custom media types ).

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-09 15:01:16 +00:00
Michael Crosby
f06e605f1a
Merge pull request #3515 from fuweid/me-remove-comment-line
remotes: remove useless line
2019-08-09 09:21:36 -04:00
Phil Estes
ec4ad5332d
Merge pull request #3506 from darfux/copy_md_when_set_ttrpcheader
namespace: Copy ttrpc metadata before setting header
2019-08-09 08:22:17 -04:00
Phil Estes
c0cf9a5905
Merge pull request #3509 from dmcgowan/update-1.3-beta-notes
Add release notes for stream processor
2019-08-09 08:20:35 -04:00
Wei Fu
282b19efd2 remotes: remove useless line
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-08-09 17:15:09 +08:00
Akihiro Suda
29d5eb69bc
Merge pull request #1228 from Random-Liu/improve-vendor
Improve vendor.conf
2019-08-09 15:08:27 +09:00
Li Yuxuan
a3a30635ef namespace: Copy ttrpc metadata before setting header
If there are multiple goroutines calling `namespace.WithNamespace` on a
ctx that already had namespace, there will be a data race when
`withTTRPCNamespaceHeader` calling `MD.Set()`. So we have to copy the md
before using it.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-08-09 13:16:29 +08:00
Wei Fu
a1c88e195a
Merge pull request #3484 from rancher/master
Limit multiple platform manifests to one for size check
2019-08-09 10:09:50 +08:00
Phil Estes
b4dce14ac0
Merge pull request #3510 from dmcgowan/remove-ppc64le
Remove ppc64le from travis
2019-08-08 21:07:49 -04:00
Derek McGowan
04b7f1b594
Remove ppc64le from travis
The tests run too slow and flaky. Once the flakiness and
speed are addressed we can re-enable.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-08 16:11:17 -07:00
Derek McGowan
2fac3ee27d
Add release notes for stream processor
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-08 14:43:34 -07:00
Darren Shepherd
1161409779 Limit multiple platform manifests to one for size check
client.Pull will only pull one matching platform by default.
When checking the size of image we match that behavior so that
we don't look for multiple platforms that might not exist on disk.

Signed-off-by: Darren Shepherd <darren@rancher.com>
2019-08-08 14:16:27 -07:00
Lantao Liu
f994f43aec Update vendors.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-08 10:39:50 -07:00
Lantao Liu
7d56fdcc83 Split dependencies and update sort-vendor correspondingly
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-08 10:39:50 -07:00
Michael Crosby
23faecfb66
Merge pull request #3505 from crosbymichael/remoteopts-unpack
Add UnpackOpts to RemoteContext
2019-08-08 13:20:34 -04:00
Michael Crosby
fe3638e887 Add UnpackOpts to RemoteContext
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-08 15:42:51 +00:00
Michael Crosby
1eb13fc2f0
Merge pull request #3501 from wanghuaiqing2010/master
cast Rdev of Stat_t to uint64 for mips
2019-08-08 10:27:52 -04:00
Lantao Liu
aaf15b6777
Merge pull request #1225 from awprice/privileged_without_host_devices_flag
Add flag to overload default privileged host device behaviour
2019-08-08 00:13:02 -07:00
wanghuaiqing
d8322e38c7 cast Rdev of Stat_t to uint64 for mips
Signed-off-by: wanghuaiqing <wanghuaiqing@loongson.cn>
2019-08-08 14:24:50 +08:00
Alex Price
3353ab76d9 Add flag to overload default privileged host device behaviour
This commit adds a flag to the runtime config that allows overloading of the default
privileged behaviour. When the flag is enabled on a runtime, host devices won't
be appended to the runtime spec if the container is run as privileged.

By default the flag is false to maintain the current behaviour of privileged.

Fixes #1213

Signed-off-by: Alex Price <aprice@atlassian.com>
2019-08-08 12:16:42 +10:00
Lantao Liu
95bd02d28f
Merge pull request #1200 from jterry75/image_user
Assign ImageSpec User if SecurityContext is not set
2019-08-07 13:50:08 -07:00
Lantao Liu
8ea0cc90aa
Merge pull request #1221 from jterry75/log_g
Switch to containerd/log package
2019-08-07 13:49:33 -07:00