Commit Graph

8706 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
Wei Fu
4ce334aa49 reload cni network config if has fs change events
With go RWMutex design, no goroutine should expect to be able to
acquire a read lock until the read lock has been released, if one
goroutine call lock.

The original design is to reload cni network config on every single
Status CRI gRPC call. If one RunPodSandbox request holds read lock
to allocate IP for too long, all other RunPodSandbox/StopPodSandbox
requests will wait for the RunPodSandbox request to release read lock.
And the Status CRI call will fail and kubelet becomes NOTReady.

Reload cni network config at every single Status CRI call is not
necessary and also brings NOTReady situation. To lower the possibility
of NOTReady, CRI will reload cni network config if there is any valid fs
change events from the cni network config dir.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-04-03 12:28:58 +08: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
Mike Brown
7013a825b0
Merge pull request #1424 from fvoznika/patch-1
Start docker unconditionally
2020-04-01 08:27:22 -05: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
Fabricio Voznika
efddc5f252 Start docker unconditionally
`systemctl is-enabled` is not a reliable indicator that the docker service should be started. Docker service may be running even if marked as disabled.

Signed-off-by: Fabricio Voznika <fvoznika@google.com>
2020-03-31 15:29:17 -07: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
Mike Brown
27d4fd5979
Merge pull request #1425 from dims/fix-x/sys-dependency-version
use the same dependency version for x/sys from containerd/containerd
2020-03-30 12:00:13 -05:00
Davanum Srinivas
61f095b73e
use the same dependency version for x/sys from containerd/containerd
The versions of x/sys drifted between the repos:
- https://github.com/containerd/cri/blob/master/vendor.conf#L53
- https://github.com/containerd/containerd/blob/master/vendor.conf#L49

Picking the one that is newer:
52ab431487...5c8b2ff675

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-30 11:17:58 -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
dd3c5f08b8
Merge pull request #1418 from darfux/fix_handle_resizing_leak
Fix goroutine leak when exec/attach
2020-03-28 22:51:51 +09: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
Mike Brown
67566810f7
Merge pull request #1426 from dims/vendor-update-kubernetes-v1.18.0
vendor: update kubernetes v1.18.0
2020-03-27 14:19:49 -05: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
Davanum Srinivas
95b7c08260
vendor: update kubernetes v1.18.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-27 09:39:58 -04: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
Mike Brown
c1115d4e57
Merge pull request #1422 from chenrui333/update-golang-versions
Bump golang to v1.13.9 and v1.14.1

Mike: golang service referesh:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.9+label%3ACherryPickApproved
2020-03-25 15:06:55 -05:00
Mike Brown
cc3fbebec2
Merge pull request #1423 from dims/add-version-numbers-for-newly-tagged-repos
Add version numbers for newly tagged repos
2020-03-25 14:55:45 -05: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
Davanum Srinivas
172cf68b53
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:19:42 -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
Rui Chen
664acc1396
Bump golang to v1.13.9 and v1.14.1
Signed-off-by: Rui Chen <chenrui333@gmail.com>
2020-03-25 09:20:29 -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
Li Yuxuan
cb0140063e Fix goroutine leak when exec/attach
The resize chan is never closed when doing exec/attach now. What's more,
`resize` is a recieved only chan so it can not be closed. Use ctx to
exit the goroutine in `handleResizing` properly.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-03-24 10:42:54 +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