Commit Graph

12660 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
778ac302b2
log: define G() as a function instead of a variable
The `G` variable is exported, and not expected to be overwritten
externally. Defining it as a function also documents it as a function
on https://pkg.go.dev, instead of a variable; https://pkg.go.dev/github.com/containerd/containerd@v1.6.22/log#pkg-variables

Note that (while the godoc suggests otherwise) I made `GetLogger` an alias
for `G`, as `G` is the most commonly used function (not the other way round),
although I don't think there's a performance gain in doing so.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
81ac648d91
log: add all log-levels that are accepted
While other log-levels are not currently used in containerd itself,
they can be returned by `GetLevel()`, and are accepted (no error) by
`SetLevel()`. We should either accept those values, or produce an
error (in `SetLevel()`), but given that there's other ways to set the
log-level, we should probably acknowledge that this package is a transitional
package, and still closely tied to logrus (for the time being).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
0b6333a412
log: group "enum" consts and touch-up docs
Also updated the level descriptions with their documentation from
logrus.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
4a36022e20
log: WithLogger: remove redundant intermediate var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
40ee5fb11b
log: SetFormat: include returns in switch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
6fe7e03b80
log: remove testify dependency
Testify was only used for a basic assertion. Remove the dependency,
in preparation of (potentially) moving this package to a separate
module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
e2ad5a985e
removes/docker: remove unnecessary conversion (unconvert)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:31 +02:00
Markus Lehtonen
ed47d6ba76 cri: implement RuntimeConfig rpc
The rpc only reports one field, i.e. the cgroup driver, to kubelet.
Containerd determines the effective cgroup driver by looking at all
runtime handlers, starting from the default runtime handler (the rest in
alphabetical order), and returning the cgroup driver setting of the
first runtime handler that supports one. If no runtime handler supports
cgroup driver (i.e. has a config option for it) containerd falls back to
auto-detection, returning systemd if systemd is running and cgroupfs
otherwise.

This patch implements the CRI server side of Kubernetes KEP-4033:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/4033-group-driver-detection-over-cri

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-28 13:50:43 +03:00
Phil Estes
81895d22c9
Merge pull request #8867 from Iceber/pinned_image_label
cri: fix using the labels to pin image
2023-07-27 09:51:23 -04:00
Fu Wei
bdbcf96267
Merge pull request #8868 from AkihiroSuda/epoch-y2038
pkg/epoch: fix Y2038 on 32-bit hosts
2023-07-26 13:43:53 +08:00
Iceber Gu
7f7ba31b64 cri: fix using the pinned label to pin image
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-07-26 12:26:00 +08:00
Akihiro Suda
4807571352
pkg/epoch: fix Y2038 on 32-bit hosts
`strconv.Itoa(int(tm.Unix()))` rounds the time to 32-bit int on 32-bit hosts

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-26 13:17:39 +09:00
Fu Wei
8348a8cecb
Merge pull request #8862 from borg-land/change-buckets
Migrate to community bucket for node e2e tests
2023-07-26 12:15:57 +08:00
Mahamed Ali
98974117b3 migrate to community owned bucket
Signed-off-by: Mahamed Ali <cy@borg.dev>
2023-07-25 12:09:54 +03:00
Markus Lehtonen
850b2e1bf3 go.mod: update cri-api to v1.28.0-beta.0
Required to support upcoming Kubernetes (v1.28) features.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-24 14:49:14 +03:00
Fu Wei
6eb90a63e0
Merge pull request #8837 from anmaxvl/fix-ctr-images-check-quiet
fix: `ctr images check -q` outputs not unpacked images
2023-07-24 10:39:43 +08:00
Fu Wei
e587e45044
Merge pull request #8857 from mqasimsarfraz/qasim/fix-swap-limit
cri: memory.memsw.limit_in_bytes: no such file or directory
2023-07-24 09:54:52 +08:00
Fu Wei
7061cae60f
Merge pull request #8858 from AkihiroSuda/go-mod-20230723
go.mod: bump up
2023-07-24 09:52:05 +08:00
Fu Wei
5bab55c3f3
Merge pull request #8859 from AkihiroSuda/ci-ubuntu-22.04
.github/workflows/ci.yml: upgrade Ubuntu from 20.04 to 22.04
2023-07-24 09:51:42 +08:00
Akihiro Suda
480bc8a2be
.github/workflows/ci.yml: upgrade Ubuntu from 20.04 to 22.04
- `release.yml` continues to use Ubuntu 20.04 for glibc compatibility
- cgroup v1 is no longer tested with Ubuntu, but still tested with Rocky 8

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 18:49:02 +09:00
Akihiro Suda
bc96b9039a
go.mod: github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0
5330a85ea6...8075edf89b

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:01 +09:00
Akihiro Suda
da27408854
go.mod: google.golang.org/genproto v0.0.0-20230720185612-659f7aaaa771
ccb25ca9f1...659f7aaaa7

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:01 +09:00
Akihiro Suda
73dc13ad62
go.mod: github.com/urfave/cli/compare v1.22.14
https://github.com/urfave/cli/compare/v1.22.13...v1.22.14

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
1c4fc568b1
go.mod: github.com/prometheus/client_golang/compare v1.16.0
https://github.com/prometheus/client_golang/compare/v1.14.0...v1.16.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
68abb525a5
go.mod: github.com/minio/sha256-simd v1.0.1
https://github.com/minio/sha256-simd/compare/v1.0.0...v1.0.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
1f2216cc78
go.mod: github.com/klauspost/compress v1.16.7
https://github.com/imdario/mergo/compare/v0.3.13...v1.0.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
3c6ab04203
go.mod: dario.cat/mergo v1.0.0
https://github.com/imdario/mergo/compare/v0.3.13...v1.0.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
4bda0a69e2
go.mod: github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
0f033b6125
go.mod: github.com/emicklei/go-restful/v3 v3.10.2
https://github.com/emicklei/go-restful/compare/v3.10.1...v3.10.2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
90e050298c
go.mod: github.com/containernetworking/plugin v1.3.0
https://github.com/containernetworking/plugins/compare/v1.2.0...v1.3.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
0498acefb9
go.mod: github.com/.../container-device-interface v0.6.0
https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.4...v0.6.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
74b8cb850a
go.mod: github.com/opencontainers/runc v1.1.8
https://github.com/opencontainers/runc/compare/v1.1.7...v1.1.8

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
895dd2e93b
go.mod: github.com/opencontainers/image-spec v1.1.0-rc4
https://github.com/opencontainers/image-spec/compare/v1.1.0-rc3...v1.1.0-rc4

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:58 +09:00
Akihiro Suda
235a4452df
go.mod: github.com/opencontainers/runtime-spec v1.1.0
https://github.com/opencontainers/runtime-spec/compare/v1.1.0-rc.2...v1.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:58 +09:00
Fu Wei
59959b31ff
Merge pull request #8852 from bpfoster/issue-8851
Fix ro mount option being passed
2023-07-21 21:14:48 +08:00
Qasim Sarfraz
06f18c69d2 cri: memory.memsw.limit_in_bytes: no such file or directory
If kubelet passes the swap limit (default memory limit = swap limit ),
it is configured for container irrespective if the node supports swap.

Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-07-21 14:43:33 +02:00
Ben Foster
f3daf32c73 Fix ro mount option being passed
"ro" was not parsed out of the string, so it was passed as part of data
to mount().
This would lead to mount() returning an invalid argument code.
Separate out the "ro" option, much like "userxattr", which will allow
the MS-RDONLY mountflag to get set.

Signed-off-by: Ben Foster <bpfoster@gmail.com>
2023-07-20 17:08:01 -04:00
Maksym Pavlenko
4d2c887990
Merge pull request #8841 from thaJeztah/bump_runc_binary_1.1.8
update runc binary to v1.1.8
2023-07-19 12:53:55 -07:00
Sebastiaan van Stijn
b2967a8d64
update runc binary to v1.1.8
release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.8
full diff: https://github.com/opencontainers/runc/compare/v1.1.7...v1.1.9

This is the eighth patch release of the 1.1.z release branch of runc.
The most notable change is the addition of RISC-V support, along with a
few bug fixes.

- Support riscv64.
- init: do not print environment variable value.
- libct: fix a race with systemd removal.
- tests/int: increase num retries for oom tests.
- man/runc: fixes.
- Fix tmpfs mode opts when dir already exists.
- docs/systemd: fix a broken link.
- ci/cirrus: enable some rootless tests on cs9.
- runc delete: call systemd's reset-failed.
- libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.
- CI: bump Fedora, Vagrant, bats.
- .codespellrc: update for 2.2.5.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 18:16:06 +02:00
Maksym Pavlenko
8dcc06d14a
Merge pull request #8747 from Iceber/shim_ttrpc_service
shim: change ttrpcService and ttrpcServerOptioner to exported interfaces
2023-07-18 17:12:22 -07:00
Akihiro Suda
e26b669ba9
Merge pull request #8838 from AkihiroSuda/revert-8789
Revert "Add support for bind-mounts on Darwin (a.k.a. "make native snapshotter work")" (#8789)
2023-07-19 05:24:20 +09:00
Kazuyoshi Kato
ef1c9f0a63
Merge pull request #8766 from lengrongfu/fix/ci-Integration-fail
fix ci Linux Integration test fail
2023-07-18 10:18:12 -07:00
Maksim An
90ecb8104e fix: ctr images check outputs not unpacked images in quite mode
`ctr images check -q` shouldn't output images which were not
unpacked.

Signed-off-by: Maksim An <maksiman@microsoft.com>
2023-07-18 10:16:54 -07:00
Kazuyoshi Kato
e5a49e6ceb
Merge pull request #8789 from slonopotamus/macos-bind-mount
Add support for bind-mounts on Darwin (a.k.a. "make native snapshotter work")
2023-07-18 10:16:10 -07:00
Akihiro Suda
98f27e1d9c
Revert "Add support for mounts on Darwin"
This reverts commit 2799b28e61.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-19 00:22:20 +09:00
Akihiro Suda
e939d13195
Revert "Revert 416899fc8e81a80a4b09b59c801f98d36ddc0e74"
This reverts commit 6c9c711120.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-19 00:22:05 +09:00
Phil Estes
f86d585ce6
Merge pull request #8811 from kiashok/updateHcsshimTag
Update hcsshim tag to v0.10.0-rc.9
2023-07-17 20:33:16 -04:00
Marat Radchenko
6c9c711120 Revert 416899fc8e
That commit neither helps without a working bind-mount implementation nor is needed when such implementation exists.

Testing shows that containerd can properly download and unpack image using bindfs mounts (see previous commit) even without Darwin-specific applier code.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-17 23:27:04 +03:00
Marat Radchenko
2799b28e61 Add support for mounts on Darwin
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-17 23:27:04 +03:00
Kirtana Ashok
56d80f81a2 Update hcsshim tag to v0.10.0-rc.9
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-07-17 10:28:47 -07:00