Commit Graph

14496 Commits

Author SHA1 Message Date
Kazuyoshi Kato
30354134d4
Merge pull request #8553 from aznashwan/windows-workflow-2019-base-sku
Windows Integration: Switch Azure-based CI to vanilla 2019 image.
2023-05-31 09:29:14 -07:00
Evan Lezar
d3887b2e62 Support CDI devices in ctr --device flag
This change adds support for CDI devices to the ctr --device flag.
If a fully-qualified CDI device name is specified, this is injected
into the OCI specification before creating the container.

Note that the CDI specifications and the devices that they represent
are local and mirror the behaviour of linux devices in the ctr command.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2023-05-31 16:14:01 +02:00
Phil Estes
80eb76332e
Merge pull request #8602 from mxpv/sbevents
Publish sandbox events
2023-05-31 09:14:08 -04:00
Akihiro Suda
65bca439a9
Merge pull request #8599 from lengrongfu/doc/update-auths-code-comment
update auths code comment
2023-05-31 22:13:54 +09:00
Phil Estes
bd7f543869
Merge pull request #8601 from rye-stripe/add-ctr-run-flags
Add cpuset flags to 'ctr run'
2023-05-31 09:11:26 -04:00
Aditi Sharma
3ca5b4437e Remove cni conf_template deprecation
As discussed in the issue
https://github.com/containerd/containerd/issues/8596
It is a helpful feature at many places and no replacement
readily available

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2023-05-31 17:34:33 +05:30
Samuel Karp
8454b23ead
Merge pull request #8597 from thaJeztah/unpack_nits
Image: fix some minor nits
2023-05-31 02:06:48 -07:00
Sebastiaan van Stijn
94f0af3ece
Image.IsUnpacked(): make error-handling more iodiomatic
Check for "err != nil" instead of "err == nil".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-31 09:47:48 +02:00
Sebastiaan van Stijn
54658a1152
Image: rename variable that shadowed import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-31 09:47:27 +02:00
rongfu.leng
d2b7a1e293 cleanup DEPRECATED TLS config
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-31 09:37:41 +08:00
Samuel Karp
8b66a752c9
Merge pull request #7376 from tianon/oci-platform 2023-05-30 18:14:31 -07:00
Maksym Pavlenko
f857626d64 Move PLEG event back to CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 16:40:58 -07:00
Maksym Pavlenko
fc50334ca9 Generate sandbox exit events from CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 16:40:58 -07:00
Derek McGowan
c7b9a95bdc
Merge pull request #8603 from cji/cji-mount
Add handling of a '.' commondir and bounds checking to mount_linux
2023-05-30 16:27:54 -07:00
Craig Ingram
d2605de734 add handling of a '.' commondir and bounds checking to mount_linux
Signed-off-by: Craig Ingram <Cjingram@google.com>
2023-05-30 21:13:16 +00:00
Maksym Pavlenko
cf56054594 Move pod sandbox recovery to podsandbox/ package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Maksym Pavlenko
45dbb4e542 Publish sandbox events
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Maksym Pavlenko
65906335bf Add sandbox events protos
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Tianon Gravi
21b3318ebe Fix several conversions of "ocispec.Image" to "ocispec.Platform"
Several bits of code unmarshal image config JSON into an `ocispec.Image`, and then immediately create an `ocispec.Platform` out of it, but then discard the original image *and* miss several potential platform fields (most notably, `variant`).

Because `ocispec.Platform` is a strict subset of `ocispec.Image`, most of these can be updated to simply unmarshal the image config directly to `ocispec.Platform` instead, which allows these additional fields to be picked up appropriately.

We can use `tianon/raspbian` as a concrete reproducer to demonstrate.

Before:

```console
$ ctr content fetch docker.io/tianon/raspbian:bullseye-slim
...

$ ctr image ls
REF                                     TYPE                                                 DIGEST                                                                  SIZE     PLATFORMS    LABELS
docker.io/tianon/raspbian:bullseye-slim application/vnd.docker.distribution.manifest.v2+json sha256:66e96f8af40691b335acc54e5f69711584ef7f926597b339e7d12ab90cc394ce 28.6 MiB linux/arm/v7 -
```

(Note that the `PLATFORMS` column lists `linux/arm/v7` -- the image itself is actually `linux/arm/v6`, but one of these bits of code leads to only `linux/arm` being extracted from the image config, which `platforms.Normalize` then updates to an explicit `v7`.)

After:

```console
$ ctr image ls
REF                                     TYPE                                                 DIGEST                                                                  SIZE     PLATFORMS    LABELS
docker.io/tianon/raspbian:bullseye-slim application/vnd.docker.distribution.manifest.v2+json sha256:66e96f8af40691b335acc54e5f69711584ef7f926597b339e7d12ab90cc394ce 28.6 MiB linux/arm/v6 -
```

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-30 13:13:02 -07:00
Derek McGowan
6d7060099b
Merge pull request #8552 from dcantah/cross-plat-stats
CRI: Make stats respect sandbox's platform
2023-05-30 09:58:50 -07:00
Derek McGowan
197b27bd02
Merge pull request #8586 from mcdonagj/fix-spelling-of-repository-in-nri-docs
Fix: Correct the spelling of repository within the NRI plugin documentation.
2023-05-30 09:27:44 -07:00
Peteris Rudzusiks
f2bc737825 Add cpuset-mems flag to 'ctr run' command
This flag allows cpuset.mems to be specified when running a container. If
provided, the container will use only the defined memory nodes.

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-30 17:56:18 +02:00
Peteris Rudzusiks
f642c0a5f5 ctr: add cpuset-cpus flag to 'ctr run' command
This flag allows cpuset.cpus to be specified when starting a container. If
provided, the container will use only the defined CPU cores.

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-30 17:50:33 +02:00
Derek McGowan
f49789fd54
Merge pull request #8594 from fuweid/fix-blockfile-mount
snapshots/blockfile: use loop if options is empty
2023-05-30 08:33:09 -07:00
Derek McGowan
8e90799d1c
Merge pull request #8595 from cardyok/scratch_generator_use_dst
snapshots/blockfile: use passed in dst in scratchGenerator
2023-05-30 08:32:27 -07:00
rongfu.leng
314d758fa1 update auths code comment
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-30 23:05:48 +08:00
Cardy.Tang
9702d4aeec snapshots/blockfile: use passed in dst in scratchGenerator
Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-05-30 11:42:19 +08:00
Wei Fu
bb82f3683e snapshots/blockfile: use loop if options is empty
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-29 23:26:39 +08:00
Samuel Karp
4b7145cfd3
Merge pull request #8587 from lengrongfu/feat/upgrade_pause_version 2023-05-29 00:55:22 -07:00
rongfu.leng
9287711b7a upgrade registry.k8s.io/pause version
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-28 07:59:10 +08:00
Gary McDonald
fbb38ab6b8
Fix the spelling of repository within the NRI plugin documentation.
Signed-off-by: Gary McDonald <mcdonagj@dukes.jmu.edu>
2023-05-27 13:18:46 -04:00
chschumacher1994
752e13d9a9
fix(docs): minor fix on the windows installation steps
If this command is used without "-Container:$false" and the "containerd" directory does not already exist all files will be merged into a single "containerd" file instead of a new directory.

Signed-off-by: chschumacher1994 <115921143+chschumacher1994@users.noreply.github.com>
2023-05-27 01:35:42 +02:00
Samuel Karp
d0dba8e163
Merge pull request #8576 from henry118/ready 2023-05-26 14:41:57 -07:00
Nashwan Azhari
c1b9268007 Windows Integration: Switch Azure-based CI to vanilla 2019 image.
This patch switches the Azure-based Windows workflows to using the
vanilla `2019-Datacenter` Azure SKU following the deprecation of the
old specialized `2019-Datacenter-with-Containers-smalldisk` SKU which
was previously used.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2023-05-26 21:26:05 +03:00
Gabriel Adrian Samfira
b9dfd29b73 Update tests to use volume-copy-up:2.2
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-26 07:33:06 +00:00
Henry Wang
4bfcac85fa notify readiness when registered plugins are ready
Signed-off-by: Henry Wang <henwang@amazon.com>
2023-05-26 03:07:40 +00:00
Kazuyoshi Kato
ed7c0ebe28
Merge pull request #8573 from estesp/fix-test-image-index-static-content
Update volume-ownership image with latest hashes
2023-05-25 11:23:52 -07:00
James Jenkins
7819da843b Document Protocol Buffer Setup
Document the protocol buffer setup script and make note of external
proto files that must be added for successful generation.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2023-05-25 12:14:07 -04:00
Phil Estes
579b5596c5 Update volume-ownership image with latest hashes
Fixes test which requires static content to match a GHCR-located image which was recently updated.

Signed-off-by: Phil Estes <estesp@amazon.com>
2023-05-25 11:13:57 -04:00
Gabriel Adrian Samfira
88a3e25b3d Add targetOS to WithVolumes()
Windows systems are capable of running both Windows Containers and Linux
containers. For windows containers we need to sanitize the volume path
and skip non-C volumes from the copy existing contents code path. Linux
containers running on Windows and Linux must not have the path sanitized
in any way.

Supplying the targetOS of the container allows us to proprely decide
when to activate that code path.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Gabriel Adrian Samfira
c7ec95caf4 Reword comment and make slight change to code
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Gabriel Adrian Samfira
ec2bec6481 Fix non C volumes on Windows
Images may be created with a VOLUME stanza pointed to drive letters that
are not C:. Currently, an image that has such VOLUMEs defined, will
cause containerd to error out when starting a container.

This change skips copying existing contents to volumes that are not C:.
as an image can only hold files that are destined for the C: drive of a
container.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Samuel Karp
b16b0c872d
Merge pull request #8559 from dmcgowan/blockfile-add-mount-options 2023-05-24 14:46:48 -07:00
Samuel Karp
3d7522b7f2
ctr: allow run to override mounts
If a mount destination is specified both in the default spec and in a
--mount option, remove the default mount before adding new mounts.  This
allows overriding the default sysfs mount, for example.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-05-24 13:54:40 -07:00
Derek McGowan
5997a65896
Merge pull request #8554 from ktock/remote-snapshotter-docs
docs/remote-snapshotter.md: update links and description
2023-05-23 12:18:21 -07:00
Derek McGowan
7beaa5e859
Add mount options to blockfile snapshotter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-23 10:56:20 -07:00
Kohei Tokunaga
261d45efe1
docs/remote-snapshotter.md: update links and description
This commit fixes a broken link. This commit also updates the description about
the image handler. It now mentions about
`github.com/containerd/containerd/pkg/snapshotters` package.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-05-23 22:55:57 +09:00
Danny Canter
7274e33e38 CRI: Make stats respect sandbox's platform
To further some ongoing work in containerd to make as much code as possible
able to be used on any platform (to handle runtimes that can virtualize/emulate
a variety of different OSes), this change makes stats able to be handled on
any of the supported stat types (just linux and windows). To accomplish this,
we use the platform the sandbox returns from its `Platform` rpc to decide
what format the containers in a given sandbox are returning metrics in, then
we can typecast/marshal accordingly.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-23 01:32:36 -07:00
Fu Wei
773874caea
Merge pull request #8547 from zhaojizhuang/bolt
[sandbox] Optimize metadata Schema notes to correctly match metadata structures
2023-05-23 15:32:47 +08:00
Derek McGowan
65c7c92792
Merge pull request #8534 from gabriel-samfira/fix-image-workflow
Fix image workflow
2023-05-22 19:20:36 -07:00