Commit Graph

13325 Commits

Author SHA1 Message Date
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
Phil Estes
a94918b591
Merge pull request #8803 from kinvolk/rata/userns-sbserver
cri/sbserver: Add support for user namespaces (KEP-127)
2023-07-17 10:57:01 -04:00
Phil Estes
4c538164e6
Merge pull request #8818 from thaJeztah/use_registry.k8s.io
pkg/cri/server: TestImageGetLabels: use registry.k8s.io
2023-07-14 09:45:54 -04:00
Sebastiaan van Stijn
9c673f9673
pkg/cri/server: TestImageGetLabels: use registry.k8s.io
These are not actually being pulled, just removing the deprecated k8s.gcr.io
from the code-base. While at it, also renamed / removed vars that shadowed
with package-level definitions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-14 11:22:39 +02:00
Mike Brown
3ed1bc108f
Merge pull request #8671 from jsturtevant/fix-windows-edge-cases
[cri] Handle pod transition states gracefully while listing pod stats
2023-07-12 15:43:21 -05:00
James Sturtevant
f914edf4f6
[cri] Handle Windows pod transitions gracefully
When the pods are transitioning there are several
cases where containers might not be in valid state.
There were several cases where the stats where
failing hard but we should just continue on as
they are transient and will be picked up again
when kubelet queries for the stats again.

Signed-off-by: James Sturtevant <jstur@microsoft.com>

Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-07-12 09:57:14 -07:00
Phil Estes
0098eacf93
Merge pull request #8804 from dcantah/go-bump-1.20.6
Update Go to 1.20.6,1.19.11
2023-07-12 09:56:53 -04:00
Fu Wei
8f89bd7be3
Merge pull request #8723 from djdongjin/dedup-WithNewSnapshot 2023-07-12 09:36:36 +08:00
Danny Canter
52ef3468bc Update Go to 1.20.6,1.19.11
go1.20.6 (released 2023-07-11) includes a security fix to the net/http
package, as well as bug fixes to the compiler, cgo, the cover tool, the
go command, the runtime, and the crypto/ecdsa, go/build, go/printer,
net/mail, and text/template packages. See the Go 1.20.6 milestone on
our issue tracker for details.

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

Full diff: https://github.com/golang/go/compare/go1.20.5...go1.20.6

These minor releases include 1 security fixes following the security policy:

- net/http: insufficient sanitization of Host header

The HTTP/1 client did not fully validate the contents of the Host header.
A maliciously crafted Host header could inject additional headers or
entire requests. The HTTP/1 client now refuses to send requests containing
an invalid Request.Host or Request.URL.Host value.

Thanks to Bartek Nowotarski for reporting this issue.

Includes security fixes for CVE-2023-29406 and Go issue https://go.dev/issue/60374

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-07-11 14:34:23 -07:00
Phil Estes
0789790f07
Merge pull request #8418 from sxllwx/fix/k8s-issue-74551
bugfix(port-forward): Correctly handle known errors
2023-07-11 10:02:56 -04:00
Phil Estes
34b1653e95
Merge pull request #8780 from slonopotamus/uncopypaste-read-spec
Uncopypaste parsing of OCI Bundle spec file
2023-07-11 09:53:00 -04:00
Rodrigo Campos
48cdf1fe2c integration: Enable userns tests for sbserver
Now we ported support to sbserver, let's enable the e2e tests there too.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
9160386ecc cri/sbserver: Test net.ipv4.ping_group_range works with userns
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
1c6e268447 cri/sbserver: Fix net.ipv4.ping_group_range with userns
This commit just updates the sbserver with the same fix we did on main:
	9bf5aeca77 ("cri: Fix net.ipv4.ping_group_range with userns ")

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
36a96d7f32 cri/sbserver: Remap snapshots for sbserver too
This is a port of 31a6449734 ("Add capability for snapshotters to
declare support for UID remapping") to sbserver.

This patch remaps the rootfs in the platform-specific if user namespaces
are in use, so the pod can read/write to the rootfs.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:22 +02:00
Rodrigo Campos
508e6f6e03 cri/sbserver: Add userns tests to TestLinuxSandboxContainerSpec()
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
fb9ce5d482 cri/sbserver: Support pods with user namespaces
This patch requests the OCI runtime to create a userns when the CRI
message includes such request.

This is an adaptation of a7adeb6976 ("cri: Support pods with user
namespaces") to sbserver, although the container_create.go parts were
already ported as part of 40be96efa9 ("Have separate spec builder for
each platform"),

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
c99cb95f07 cri/sbserver: Let OCI runtime create netns when userns is used
This commit just ports 36f520dc04 ("Let OCI runtime create netns when
userns is used") to sbserver.

The CNI network setup is done after OCI start, as it didn't seem simple
to get the sandbox PID we need for the netns otherwise.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
73c75e2c73 cri/sbserver: Copy userns helpers to podsandbox
Currently there is a big c&p of the helpers between these two folders
and a TODO in the platform agnostic file to organize them in the future,
when some other things settle.

So, let's just copy them for now.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:12 +02:00
Rodrigo Campos
0b6a0fe773 cri/sbserver: Move runtimeStart to match position with cri/server
Commit c085fac1e5 ("Move sandbox start behind controller") moved the
runtimeStart to only account for time _after_ the netns has been
created.

To match what we currently do in cri/server, let's move it to just after
the get the sandbox runtime.

This come up when porting userns to sbserver, as the CNI network setup
needs to be done at a later stage and runtimeStart was accounting for
the CNI network setup time only when userns is enabled.

To avoid that discrepancy, let's just move it earlier, that also matches
what we do in cri/server.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Rodrigo Campos
90087ac44f WithRemapperLabels: Update doc to mention overlay supports it
Since we merged support for userns in:
	https://github.com/containerd/containerd/pull/7679

overlay has been doing a chown for the rootfs using WithRemapperLabels.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Rodrigo Campos
9d9903565a cri: Fix comment typos
Beside the "in future the when" typo, we take the chance to reflect that
user namespaces are already merged.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Marat Radchenko
9e34b8b441 Uncopypaste parsing of OCI Bundle spec file
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-11 14:41:15 +03:00
wangxiang
232538b768 bugfix(port-forward): Correctly handle known errors
These two errors can occur in the following scenarios:

ECONNRESET: the target process reset connection between CRI and itself.
see: #111825 for detail

EPIPE: the target process did not read the received data, causing the
buffer in the kernel to be full, resulting in the occurrence of Zero Window,
then closing the connection (FIN, RESET)
see: #74551 for detail

In both cases, we should RESET the httpStream.

Signed-off-by: wangxiang <scottwangsxll@gmail.com>
2023-07-11 11:06:13 +08:00
Kazuyoshi Kato
f1d2868785
Merge pull request #8798 from Jenkins-J/blockfile-test-fix-rebase
Modify loopback size
2023-07-10 13:46:38 -07:00
Phil Estes
97f2e3bc03
Merge pull request #8748 from djdongjin/cri-header-race
Resolve docker.NewResolver race condition
2023-07-10 11:12:05 -04:00
James Jenkins
5c480d9c88 Modify loopback size
Modify the loopback size in the blockfile snapshotter test setup.
Set the loopback size to 16MB when the page size is greater than 4096.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2023-07-10 11:06:24 -04:00
Phil Estes
2c73bce378
Merge pull request #8795 from dcantah/retried-typo
Fix mount pkg typo
2023-07-10 09:16:14 -04:00
Danny Canter
7ef133ad47 Fix mount pkg typo
retired -> retried

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-07-10 01:45:17 -07:00
Fu Wei
9afa2256f1
Merge pull request #8776 from thaJeztah/vagrant_locking
Cirrus CI: configure apt-get to wait for locks
2023-07-09 17:17:56 +08:00
Jin Dong
83ff030e4f Change http.Header copy to builtin Clone
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:25:47 -07:00
Jin Dong
cdb153ec92 Resolve docker.NewResolver race condition
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:25:47 -07:00
Jin Dong
01a6e1c730 Dedup WithNewSnapshotView
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:24:04 -07:00
Sebastiaan van Stijn
6a913ac82e
Cirrus CI: configure apt-get to wait for locks
I saw Cirrus CI / Vagrant BOX:rockylinux/8@5.0.0 failing during setting
up Vagrant, which may be due to other scripts provisioning the machine;

    Reading package lists...
    apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
    E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2496 (apt-get)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Configure dpkg to wait for locks to be released instead of failing. I used
60 second as timeout, which is relatively long, but given that the Vagrant
checks are known to take some time to run, is probably fine.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-07 09:06:03 +02:00
rongfu.leng
38f9bc3e0a fix ci Linux Integration test fail
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-07-07 14:51:04 +08:00
Phil Estes
3c250cb508
Merge pull request #8779 from kinvolk/rata/userns-fixes
Fix net.ipv4.ping_group_range with userns
2023-07-06 15:17:12 -04:00
Maksym Pavlenko
8c857748d9
Merge pull request #8775 from dcantah/sb-change-mount
Sandbox: Change to mount.Mount for CreateOptions
2023-07-06 09:30:06 -07:00
Phil Estes
466d884518
Merge pull request #8777 from yankay/fix-restart-with-tty
Fix the automatically restart issue when using LogURI and Terminal together
2023-07-06 10:51:11 -04:00