Commit Graph

11552 Commits

Author SHA1 Message Date
Wei Fu
6b7e237fc7 chore: use go fix to cleanup old +build buildtag
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:25:14 +08:00
Derek McGowan
cfe7ac9956
Merge pull request #7529 from iyear/refactor-metastore-tx
Refactor metastore transaction
2022-12-28 20:08:38 -08:00
Derek McGowan
729206f6d0
Merge pull request #7874 from thaJeztah/appendOSMounts_error
oci: appendOSMounts(): remove unused error, and move
2022-12-28 20:04:06 -08:00
Akihiro Suda
ec67e05738
Merge pull request #7863 from pacoxu/v1.26-kube
add kube v1.26: remove v1alph2 cri support
2022-12-29 02:47:37 +09:00
iyear
1d0619bc0c Refactor metastore transaction
Signed-off-by: Junyu Liu <ljyngup@gmail.com>
2022-12-28 18:37:28 +08:00
Fu Wei
aee92eb46e
Merge pull request #7875 from yanggangtony/runc-version
make runc 1.1 for oss_fuzz_build.sh
2022-12-28 10:42:18 +08:00
Derek McGowan
27f43506b4
Merge pull request #7872 from yanggangtony/cri-sbserver
CRI sbserver: Prevent server reuse after Shutdown
2022-12-27 15:54:29 -08:00
Derek McGowan
ba243ffaaf
Merge pull request #7521 from iyear/fix-defer
Fix incorrect defer usage and refactor judgement
2022-12-27 15:50:41 -08:00
Fu Wei
4fe2d14e1b
Merge pull request #7869 from dcantah/domainname-oci
oci: Add WithDomainname
2022-12-27 19:18:12 +08:00
yanggang
09243e43ff
make runc 1.1 for oss_fuzz_build.sh
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-12-27 18:25:53 +08:00
Sebastiaan van Stijn
94c68aa001
oci: appendOSMounts(): remove unused error, and move
This function was added in ae22854e2b, but never
returned an error, and the error-return was not handled on the callsite. This
patch removes the unused error return, and moves it to a file related to mounts,
which allowed for some of the stubs to be removed and shared between non-FreeBSD
platforms.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-27 10:23:26 +01:00
Akihiro Suda
bae8fb9142
Merge pull request #7871 from yanggangtony/error-def
Reused errdefs define error
2022-12-27 18:07:18 +09:00
Paco Xu
d66afd2116 add kube v1.26: remove v1alpha2 cri support
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-27 14:57:06 +08:00
yanggang
e94d925711
CRI sbserver: Prevent server reuse after Shutdown.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-12-27 14:16:40 +08:00
yanggang
b10536d64f
Reused errdefs define error
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-12-27 14:09:40 +08:00
Danny Canter
229779a4e5 oci: Add WithDomainname
A domainname field was recently added to the OCI spec. Prior to this
folks would need to set this with a sysctl, but now runtimes should be
able to setdomainname(2). There's an open change to runc at the moment
to add support for this so I've just left testing as a couple spec
validations in CRI until that's in and usable.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2022-12-26 04:03:45 -05:00
Fu Wei
3fefb98f99
Merge pull request #7866 from Iceber/ctr_tasks_kill
fix `ctr tasks kill` does not remove cni network under windows
2022-12-26 14:24:10 +08:00
Fu Wei
4c3eb5f0c3
Merge pull request #7858 from aojea/network_metrics 2022-12-26 09:03:16 +08:00
Kazuyoshi Kato
84b81a89ff
Merge pull request #7859 from dmcgowan/unpacker-warn-remove
Avoid using canceled context in unpacker cleanup
2022-12-23 08:11:53 -08:00
Antonio Ojea
ba0a7185f0 add network plugin metrics
Add network plugin metrics.

The metrics are the same that were used in dockershim/kubelet until
it was deprecated in kubernetes 1.23

https://github.com/kubernetes/kubernetes/blob/release-1.23/pkg/kubelet/dockershim/network/metrics/metrics.go

Signed-off-by: Antonio Ojea <aojea@google.com>
2022-12-23 09:23:56 +00:00
Iceber Gu
a2df12d1a3 fix ctr tasks kill does not remove cni network under windows
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2022-12-23 14:51:49 +08:00
Derek McGowan
6c8c427166
Merge pull request #7618 from changweige/enlarge-limit-key
image/label: print more characters of label keys
2022-12-22 17:26:26 -08:00
Derek McGowan
0bc9f7b545
Avoid using canceled context in unpacker cleanup
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-12-22 14:53:23 -08:00
Derek McGowan
b3b79813f3
Merge pull request #7165 from zouyee/nit
prevent Server reuse after a Shutdown
2022-12-22 14:09:29 -08:00
Samuel Karp
341a494c36
Merge pull request #7851 from kzys/critest-wait 2022-12-22 10:38:06 -08:00
Kazuyoshi Kato
b6df6708b9 Check containerd's readiness before calling critest
It was assuming containerd was ready right after starting.
But it depends GitHub actions' performance.

In addition to that, this commit extracts the script from ci.yml.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-22 16:29:12 +00:00
Samuel Karp
46b706ac55
Merge pull request #7837 from MarkintoshZ/main 2022-12-21 22:44:12 -08:00
Mark Zhang
a27e095480 Fix grammar and spelling mistakes in README
Signed-off-by: Mark Zhang <bf-109g2@hotmail.com>
2022-12-22 03:46:13 +00:00
Derek McGowan
c0c3546de4
Merge pull request #7636 from fangn2/fix-cpu-architecture-detection-issue-on-arm
Fix cpu architecture detection issue on linux/arm
2022-12-21 11:54:14 -08:00
Samuel Karp
3233d5d6f5
Merge pull request #7845 from dcantah/fix-noip-onrestart
Fixes https://github.com/containerd/containerd/issues/7843
2022-12-20 14:28:54 -08:00
Tony Fang
6e55234c38 Add unit test to function GetCPUVariantFromArch
Add unit test to function GetCPUVariantFromArch
Fix import issue on non-linux platforms
Fix some style issue

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2022-12-20 22:00:12 +00:00
Tony Fang
8d5c045435 Use uname machine field to get CPU variant if fails at /proc/cpuinfo
When images/containers in ARM arch were built/executed on x86 host,
getCPUVariant will fail as it tries to look for /proc/cpuinfo, whose
content is from the host. Adding a new method as fallback to check uname
machine when it happens.

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2022-12-20 21:59:32 +00:00
Derek McGowan
bd61843a25
Merge pull request #7081 from kzys/old-kernel
Enable checkRename test
2022-12-20 13:43:22 -08:00
Derek McGowan
8b3ed9f4ee
Merge pull request #7781 from dcantah/withtransaction
metastore: Add WithTransaction convenience method
2022-12-20 13:42:03 -08:00
Danny Canter
3ee6dd5c1b CRI: Fix no CNI info for pod sandbox on restart
Due to when we were updating the pod sandboxes underlying container
object, the pointer to the sandbox would have the right info, but
the on-disk representation of the data was behind. This would cause
the data returned from loading any sandboxes after a restart to have
no CNI result or IP information for the pod.

This change does an additional update to the on-disk container info
right after we invoke the CNI plugin so the metadata for the CNI result
and other networking information is properly flushed to disk.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2022-12-20 13:20:27 -08:00
Fu Wei
dd5605e444
Merge pull request #7831 from kzys/fix-race 2022-12-20 20:37:50 +08:00
Danny Canter
aa8a389c51 overlay snapshotter: Make use of WithTransaction
Move the overlay snapshotter over to using the WithTransaction convenience
method. This simplifies needing to check if we need to rollback a transaction
and saves us from needing to manually Commit ourselves.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2022-12-19 22:49:28 -08:00
Kazuyoshi Kato
d5dd11dcdc Enable checkRename test
One of the cases wouldn't work on overlayfs, but other cases and/or
snapshotters should be tested.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-19 22:06:07 +00:00
Derek McGowan
8f7cfbda29
Merge pull request #7836 from AkihiroSuda/fix-7828
cri: fix `memory.memsw.limit_in_bytes: no such file or directory`
2022-12-18 22:12:55 -08:00
Akihiro Suda
4157503881
cri: fix memory.memsw.limit_in_bytes: no such file or directory
Skip automatic `if swapLimit == 0 { s.Linux.Resources.Memory.Swap = &limit }` when the swap controller is missing.
(default on Ubuntu 20.04)

Fix issue 7828 (regression in PR 7783 "cri: make swapping disabled with memory limit")

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-12-19 11:28:07 +09:00
Kazuyoshi Kato
791428005f Prevent a race condition in testHook
The logger could be called from multiple goroutines,
but t.Log() is not designed for.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-16 23:50:38 +00:00
Phil Estes
544e31c426
Merge pull request #7824 from thaJeztah/bump_fuzz_dep
go.mod: update fuzz-headers and fuzz-build
2022-12-16 12:15:41 -05:00
Fu Wei
5ef7ea4289
Merge pull request #7825 from kzys/no-gogo
Remove github.com/gogo/protobuf again
2022-12-16 15:43:51 +08:00
Kazuyoshi Kato
54f1bdee30 "make proto-fmt" doesn't like spaces
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-15 22:54:15 +00:00
Kazuyoshi Kato
52a7480399 Remove github.com/gogo/protobuf again
While we need to support CRI v1alpha2, the implementation doesn't have
to be tied to gogo/protobuf.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-12-15 22:54:15 +00:00
Derek McGowan
a4bc380b91
Merge pull request #7814 from dcantah/hostnet-helper
CRI: Add host networking helper
2022-12-15 11:21:45 -08:00
Sebastiaan van Stijn
ce4ea26953
go.mod: update fuzz-headers and fuzz-build
Slowly chipping away non-tagged golang.org/x/ packages

diffs:

- b2031950a3...5330a85ea6
- 3345c89a7c...d395f97c48

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 17:36:05 +01:00
Fu Wei
12f30e6524
Merge pull request #7792 from mxpv/sb-shutdown 2022-12-15 13:37:35 +08:00
Maksym Pavlenko
a4d5c3e5cb Support sandboxed shims shutdown
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-14 18:22:52 -08:00
Kazuyoshi Kato
32f6e6c8aa
Merge pull request #7818 from mikebrow/cri-tools-vendor-1.26
move up to CRI-TOOLS v1.26.0
2022-12-14 14:13:54 -08:00