Commit Graph

5732 Commits

Author SHA1 Message Date
Michael Crosby
b0e71d7977
Merge pull request #4146 from kzys/cgroups-upgrade
Upgrade containerd/cgroups to b4448137398923af7f4918b8b2ad8249172ca7a6
2020-04-03 15:38:22 -04:00
Michael Crosby
c52691f732
Merge pull request #4145 from thaJeztah/bump_golang_1.13.9
Bump Golang 1.13.9
2020-04-03 15:11:41 -04:00
Kazuyoshi Kato
3261fb5c49 vendor: containerd/cgroups b4448137398923af7f4918b8b2ad8249172ca7a6
full diff: 7347743e5d...b444813739

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-04-03 11:54:48 -07:00
Sebastiaan van Stijn
aa76d95375
Bump Golang 1.13.9
go1.13.9 (released 2020/03/19) includes fixes to the go command, tools, the
runtime, the toolchain, and the crypto/cypher package. See the Go 1.13.9
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.9+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.13.8...go1.13.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-03 19:55:37 +02:00
Phil Estes
1512f0dc29
Merge pull request #4140 from thaJeztah/man_man_man
man: move ctr.1 and containerd-config to section 8
2020-04-03 11:02:41 -04:00
Sebastiaan van Stijn
ad090e67e9
man: move ctr.1, containerd-config to section 8, and fix generation
I missed this in my previous change: the ctr man page is also
in Section 8, because it's considered an administrative tool,
and containerd-config is related to containerd so updating these
as well.

This commit also fixes naming of the generated files, which was
hard-coded to .1.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-03 12:32:52 +02:00
Maksym Pavlenko
9ba5ea232c
Merge pull request #4138 from dmcgowan/registry-configuration-tools
Registry configuration package
2020-04-02 10:13:30 -07:00
Phil Estes
d8153b065a
Merge pull request #4137 from hs0210/work
Add unit test for func in remotes/docker/handler.go
2020-04-02 12:24:58 -04:00
Phil Estes
a19a357f91
Merge pull request #4139 from thaJeztah/fix_manpages
Makefile: man page: rename containerd.1 to containerd.8
2020-04-02 08:57:47 -04:00
Sebastiaan van Stijn
356782cb47
Makefile: man page: rename containerd.1 to containerd.8
The generated file was incorrectly named containerd.1 and should
be in section 8 (see [MAN-PAGES(7)]: Sections of the manual pages)

This patch fixes the filename and updates references to containerd(1)
to refer to containerd(8).

The generated file itself already had the correct section set in its
header, so didn't need updating.

[MAN-PAGES(7)]: http://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-02 13:52:06 +02:00
Derek McGowan
547301cb0c
Update ctr resolver to use new config package
Moved registry host configuration to the config package
and allows support of loading configurations from a
directory when the hosts are being resolved.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-03-31 22:52:10 -07:00
Derek McGowan
17b6050d20
Add Docker resolver configuration package
Add configuration toml file format and configuration
function to configure registry hosts from a directory
based configuration. Compatible with Docker registry
certificate loading.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-03-31 22:52:10 -07:00
Akihiro Suda
dc131aa862
support loading certs from a directory
Add `remotes/certutil` functions for loading `ca.crt`, `client.cert`, and `client.key` into `tls.Config` from a directory like `/etc/docker/certs.d/<hostname>.

See https://docs.docker.com/engine/security/certificates/ .

Client applications including CRI plugin are expected to configure the resolver using these functions.

As an example, the `ctr` tool is extended to support `ctr images pull --certs-dir=/etc/docker/certs.d example.com/foo/bar:baz`.

Tested with Harbor 1.8.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-31 21:48:08 -07:00
Hu Shuai
c263c5b146 Add unit test for func in remotes/docker/handler.go
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-04-01 11:41:01 +08:00
Phil Estes
e852da5855
Merge pull request #4135 from hs0210/work
Add unit test for func in remotes/docker/handler.go
2020-03-31 15:06:58 -04:00
Hu Shuai
c8d9c6f2a6 Add unit test for func in remotes/docker/handler.go
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-03-31 11:29:34 +08:00
Michael Crosby
a83927d5f1
Merge pull request #4134 from thaJeztah/bump_bbolt
vendor: update go.etcd.io/bbolt v1.3.4
2020-03-30 16:21:55 -04:00
Michael Crosby
e5fc99107a
Merge pull request #4132 from mxpv/linters
Move checks to Github actions
2020-03-30 09:25:51 -04:00
Wei Fu
89f9b300d8
Merge pull request #4123 from estesp/no-del-rootdir-ios
Correct logic of FIFO cleanup
2020-03-30 18:58:14 +08:00
Sebastiaan van Stijn
fb9e3d9f21
vendor: update go.etcd.io/bbolt v1.3.4
full diff: https://github.com/etcd-io/bbolt/compare/v1.3.3...v1.3.4

- Fix unsafe pointer conversions caught by Go 1.14 checkptr
- Fix unexpected delete bucket error: "delete bucket: incompatible value"
- Add support for aix
- Add go.mod
- db.Path() resolves to db.file.Name()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 11:15:37 +02:00
Maksym Pavlenko
e4cbbc78bf Move checks to Github actions
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-28 18:59:51 -07:00
Akihiro Suda
1c1a08e71a
Merge pull request #4130 from cpuguy83/docs_buildtags
Add docs for build tags used by cri.
2020-03-28 04:45:22 +09:00
Brian Goff
c1a218195d Add docs for build tags used by cri.
Since CRI is compiled in with containerd, builders should be aware that
these buildtags are available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-27 11:42:16 -07:00
Michael Crosby
7ef7d1e245
Merge pull request #4129 from crosbymichael/cgroup-idname
Allow the id for cgroup metrics to be changed
2020-03-26 14:01:10 -04:00
Michael Crosby
d654dbafac Allow the id for cgroup metrics to be changed
This makes the metrics package more extensible by allowing the default name of
`container_id` to be changed by the package caller.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-26 11:55:44 -04:00
Phil Estes
78ab1d13d2
Correct logic of FIFO cleanup
Only delete files which are FIFOs and only delete directories
which are empty after deleting FIFOs.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-03-25 14:00:28 -04:00
Phil Estes
7bdec4e47f
Merge pull request #4125 from dims/add-version-numbers-for-newly-tagged-repos
Add version numbers for newly tagged repos
2020-03-25 13:14:23 -04:00
Davanum Srinivas
92a36dc10f
Add version numbers for newly tagged repos
The following repos have been tagged as v1.0.0:

- 8375c3424e
- 92c8520ef9
- a93fcdb778

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-25 12:22:35 -04:00
Phil Estes
0c78dacbc5
Move isFifo from process/io to sys/ and make public
Make "IsFifo" a public function for use by other parts of containerd
codebase.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-03-25 10:44:17 -04:00
Phil Estes
214fbcede3
Merge pull request #4124 from thaJeztah/seccomp_time64
seccomp: add 64-bit time_t syscalls
2020-03-25 10:04:27 -04:00
Sebastiaan van Stijn
9529c69b8a
seccomp: add 64-bit time_t syscalls
Relates to https://patchwork.kernel.org/patch/10756415/

Added to whitelist:

- `clock_getres_time64` (equivalent of `clock_getres`, which was whitelisted)
- `clock_gettime64` (equivalent of `clock_gettime`, which was whitelisted)
- `clock_nanosleep_time64` (equivalent of `clock_nanosleep`, which was whitelisted)
- `futex_time64` (equivalent of `futex`, which was whitelisted)
- `io_pgetevents_time64` (equivalent of `io_pgetevents`, which was whitelisted)
- `mq_timedreceive_time64` (equivalent of `mq_timedreceive`, which was whitelisted)
- `mq_timedsend_time64 ` (equivalent of `mq_timedsend`, which was whitelisted)
- `ppoll_time64` (equivalent of `ppoll`, which was whitelisted)
- `pselect6_time64` (equivalent of `pselect6`, which was whitelisted)
- `recvmmsg_time64` (equivalent of `recvmmsg`, which was whitelisted)
- `rt_sigtimedwait_time64` (equivalent of `rt_sigtimedwait`, which was whitelisted)
- `sched_rr_get_interval_time64` (equivalent of `sched_rr_get_interval`, which was whitelisted)
- `semtimedop_time64` (equivalent of `semtimedop`, which was whitelisted)
- `timer_gettime64` (equivalent of `timer_gettime`, which was whitelisted)
- `timer_settime64` (equivalent of `timer_settime`, which was whitelisted)
- `timerfd_gettime64` (equivalent of `timerfd_gettime`, which was whitelisted)
- `timerfd_settime64` (equivalent of `timerfd_settime`, which was whitelisted)
- `utimensat_time64` (equivalent of `utimensat`, which was whitelisted)

Not added to whitelist:

- `clock_adjtime64` (equivalent of `clock_adjtime`, which was not whitelisted)
- `clock_settime64` (equivalent of `clock_settime`, which was not whitelisted)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-25 14:07:38 +01:00
Phil Estes
e0d4208f7e
Merge pull request #4122 from bergwolf/runtimeopts
ctr: do not assume runc options by default
2020-03-24 11:10:43 -04:00
Peng Tao
ebd745f91a ctr: do not assume runc options by default
If runtime is not runc, it doesn't make sense to send runc Options
as container create options, which will confuse other runtimes and
it actually causes kata shimv2 to fail to unmarshal the requset.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-24 18:45:34 +08:00
Maksym Pavlenko
058a32e771
Merge pull request #4099 from mythi/hardlink
archive: skip chmod IsNotExist error
2020-03-23 13:43:25 -07:00
Mikko Ylinen
e2269f2ae0 archive: skip chmod IsNotExist error
handleLChmod() does not properly check that files behind the handlinks exist
before calling os.Chmod(). We've seen base images where this results in
"no such file or directory" error from os.Chmod() when unpacking the image.

To keep the existing logic but fix the problem, this commit simply skips
IsNotExist error.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-03-23 20:58:28 +02:00
Derek McGowan
2899cb231a
Merge pull request #4116 from mxpv/dm-docs
Add devmapper configuration examples
2020-03-17 22:32:25 -07:00
Wei Fu
6c64032c14
Merge pull request #4115 from kolyshkin/num-signals-are-ok
ParseSignal: drop add'l check for numeric signals
2020-03-18 13:10:57 +08:00
Maksym Pavlenko
bd22653003 Add devmapper configuration examples
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-17 18:16:58 -07:00
Kir Kolyshkin
5ef66e48f2 ParseSignal: drop add'l check for numeric signals
The kernel will return an error anyway.

Drop the test case as well.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-17 14:17:03 -07:00
Derek McGowan
672eb827cb
Merge pull request #4113 from crosbymichael/shim-version
add -v to shim binaries
2020-03-17 12:42:26 -07:00
Michael Crosby
649f2aac66 add -v to shim binaries
Request came from a slack message that shims do not output their versions making
it hard for users and operators to know what version of a shim they have on the
system.  This adds a `-v` flag to the shims so that users can see if a shim is
in sync with containerd or what versions of shims that they are running.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-17 13:23:06 -04:00
Akihiro Suda
5ebd0e5d0f
Merge pull request #4114 from estesp/more-golangci-time
Increase golangci-lint timeout
2020-03-18 00:59:56 +09:00
Phil Estes
4ff9d69966
Increase golangci-lint timeout
AppVeyor is running over the current 2m timeout regularly these days
during PR CI runs.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-03-17 11:07:23 -04:00
Maksym Pavlenko
2532bdf43f
Merge pull request #4100 from lifubang/publisher
fix dial error when clean up a dead shim
2020-03-14 15:19:48 -07:00
Maksym Pavlenko
14fbcd886f
Merge pull request #4106 from thaJeztah/bump_cri
vendor: containerd/cri 92cb4ed978
2020-03-13 17:01:32 -07:00
Maksym Pavlenko
e2e40e19d7
Merge pull request #3924 from renzhengeek/renzhen/snapshot-gc
snapshots/devmapper: do not stop snapshot GC when one snapshot removing fails
2020-03-12 19:28:55 -07:00
Sebastiaan van Stijn
c00cf9a670
vendor: containerd/cri 92cb4ed978
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 23:15:45 +01:00
Phil Estes
62083eeed2
Merge pull request #4102 from kolyshkin/scan
Nit: fix use of bufio.Scanner.Err
2020-03-12 12:51:31 -04:00
lifubang
488d6194f2 fix dial error when clean up a dead shim
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-03-12 10:57:55 +08:00
Kir Kolyshkin
6e638ad27a Nit: fix use of bufio.Scanner.Err
The Err() method should be called after the Scan() loop, not inside it.

Found by: git grep -A3 -F '.Scan()'

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-11 19:36:21 -07:00