Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release notes for v1.7.0-rc.3 #8233

Merged
merged 1 commit into from Mar 9, 2023

Conversation

dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented Mar 8, 2023

The last release candidate before the final release 🤞 After this release, main will be temporarily frozen for non-release related changes until 1.7.0 final release. Full notes at https://gist.github.com/dmcgowan/4727450456569524c44fa1829276ecd1


Welcome to the v1.7.0-rc.3 release of containerd!
This is a pre-release of containerd

The eighth major release of containerd includes new functionality alongside many improvements.
This release is the last major release of containerd 1.x before 2.0.
Some functionality in this release may be considered experimental or unstable, but will become stable or default in 2.0.
This release still adheres to our backwards compatibility guarantees and users who do not use or enable new functionality should use this release with the same stability expectations.
The previous 1.6 release has also become a long term stable release for users who prefer releases with mostly stability improvements and wish to wait a few releases for new functionality.

Highlights

Sandbox API (experimental)

The sandbox API provides a new way of managing containerd's shim, providing more flexibility and functionality for multi-container environments such as Pods and VMs.
This API makes it easier to manage these groups of containers at a higher level and offers new extension points for shim implementations and clients.

  • Sandbox API (#6703)
  • CRI Sandbox API Implementation (#7228)

Transfer Service (experimental)

  • Transfer Service (#7320)

The transfer service provides a simple interface to transfer artifact objects between any source and destination. This allows for
pull and push operations to be done in containerd whether requested from clients or plugins. It is experimental in this release
to allow for further plugin development and integration into existing plugins.

See the Transfer Docs

NRI (experimental)

  • Extend NRI scope (nri#16)
  • Support for updated NRI (#6019)

The Node Resource Interface is a common framework for plugging extensions into OCI-compatible container runtimes. It provides
basic mechanisms for plugins to track the state of containers and to make limited changes to their configuration.

This release introduces NRI v0.3.0 with an updated plugin interface to cover a wide range of use cases.

See the NRI Docs

Platform Support

  • Linux containers on FreeBSD (#7000)

Runtime Features

  • Add support for CDI device injection (#6654)
  • Support for cgroups blockio (#5490)
  • Add restart policy for enhanced restart manager (#6744)

gRPC Shim Support (experimental)

  • Initial gRPC shim support (#8052)

Adds support for shims to use gRPC in addition to ttrpc. Existing ttrpc shim support is not going
away and will continue to be recommended for the best performance and lowest shim memory overhead.
The gRPC support allows implementation of a wider range of shim implementations which may not
have access to a stable ttrpc library in the implementation language. The shim protocol is also
updated to allow the shims to specify the protocol which is supported.

Road to 2.0

Refactoring

There are multiple places in the code today which are being targeted for refactoring to make long term support easier and to provide more extension points.

The CRI plugin is the most complex containerd plugin with a wide range of functionality. A major effort in this release and before 2.0 involves moving functionality
out of the single CRI plugin into smaller-scoped containerd plugins, such that they can be used and tested independently. The new sandbox and distribution interfaces provide one example of this,
but it also being done for image and network management.

The version of ttrpc has been updated this release to support streaming, allowing existing grpc services to use ttrpc.
Services are being refactored to allow ttrpc implementations, which can be served via shim and accessed using the new sandbox management capability.

  • Remove gogoproto.customtype (#6699)
  • Remove enumvalue_customname, goproto_enum_prefix and enum_customname (#6708)
  • Remove all gogoproto extensions (#6829)
  • Migrate off from github.com/gogo/protobuf (#6841)
  • ttrpc streaming (ttrpc#107)
  • Add unpack interface for client (#6749)
  • Add collectible resources to metadata gc (#6804)
  • Add version to shim protocol (#8177)
Configuration

Existing CRI configurations will be supported until 2.0.
Any functionality split out of CRI will have their configuration migrated to new plugins.
Deprecated configuration versions and configurations for deprecated features will be removed in 2.0.

Deprecation

The 2.0 release will remove any feature deprecated in 1.x. Features deprecated in this release include.

  • Docker Schema 1 Image Deprecation (#6884)

CRI Updates

  • Fix CRI plugin to setup pod network after creating the sandbox container (#5904)
  • Support image pull progress timeout (#6150)
  • Add experimental support for runtime specific snapshotters (#6899)
  • Pass all TOML runtime configuration options from CRI to the runtime (#7764)
  • Support for user namespaces in stateless pods (KEP-127) (experimental) (#7679)
  • Add timeout option for drain exec io (#7832)
  • Add network plugin metrics (#7858)
  • CRI v1alpha2 is deprecated and will be removed from containerd in containerd v2.0; if you are using the CRI API please move up to CRI v1; Kubernetes supports CRI v1 since Kubernetes 1.23 (#7863)

Other

  • Support shallow content copy by adding reader option to local content reader at (#7414)
  • Add NoSameOwner option when unpacking tars (#7386)
  • Add FetcherByDigest for fetching blobs without fetching a manifest (#7460)
  • Update default seccomp profile to block socket calls to AF_VSOCK (#7510)
  • Replace fork on mount logic with CLONE_FS (#7513)
  • Add support for default registry host configuration (#7607)
  • Use github.com/minio/sha256-simd for more efficient sha256 calculation (#7732)
  • Make OCI options cross-platform (#7928)
  • Update release builds to build from Ubuntu 20.04 with glibc 2.31 (#8021)
  • Use data field from OCI descriptor when provided for fetch (#8076)

See the changelog for complete list of changes

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan added this to the 1.7 milestone Mar 8, 2023
@AkihiroSuda
Copy link
Member

The last release candidate before the final release

containerd/nerdctl#1952 (comment)

We may still need a change for typeurl before v1.7 GA
(cc @fuweid @kzys)

@fuweid
Copy link
Member

fuweid commented Mar 8, 2023

Hi @AkihiroSuda

With this change, the nerdctl has two cgroup packages.

➜  nerdctl git:(pr-1952) go version -m ./_output/nerdctl | grep cgroups
        dep     github.com/containerd/cgroups   v1.1.0  h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
        dep     github.com/containerd/cgroups/v3        v3.0.1  h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE=

The containerd/cgroups@v1.1.0 registers the same name with containerd/cgroups@v3.0.1 for the type.
Since the proto is compatible between cgroups@v1.1.0 and cgroups@v3.0.1, the typeurl.UnmarshalAny
will unmarshal the data into cgroup@v1.1.0. But nerdctl runs into the error as nerdctl doesn't use cgroups@v1.1.0.

Currently, the cgroup@v1.1.0 is imported by dockerd so we need to update dockerd at first.

Checked that moby/moby#44886. And I try to test it in my local and I found that error when I run docker stats.
Since the pr has updated to cgroups@v3.0.1, but the typeurl is still using v1.0.2 version, the dockerd doesn't register the proto type and the error show up.

ERRO[2023-03-08T10:07:44.991038560Z] collecting stats for 4081773abb830b05f598242d41591936e6d75d624344aa6e548a0cb2df376d68: type with url io.containerd.cgroups.v1.Metrics: not found

I think the moby/moby#44886 should include the typeurl update. And after it merged, nerdctl can bump to new one.

Side-note

The containerd v1.7.x only relies on one cgroup package. And the containerd-shim(<=1.6.x) uses containerd/cgroups@v1.x.x which is using the same proto defination with containerd/cgroups@v3.0.1.
So the containerd v1.7.x can take over existing old-version containerd-shims.

# linux 
➜  containerd git:(main) make BUILDTAGS="no_aufs no_btrfs" bin/containerd
+ bin/containerd
go build  -gcflags=-trimpath=/home/weifu/go/src -buildmode=pie  -o bin/containerd -ldflags '-X github.com/containerd/containerd/version.Version=v1.7.0-rc.2-6-g29e10a192 -X github.com/containerd/containerd/version.Revision=29e10a192a676628080dd79b9500e609df3b470f -X github.com/containerd/containerd/version.Package=github.com/containerd/containerd -s -w ' -tags "no_aufs no_btrfs urfave_cli_no_docs"  ./cmd/containerd
➜  containerd git:(main) go version -m bin/containerd | grep cgroups
        dep     github.com/containerd/cgroups/v3        v3.0.1  h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE=

It's also compatible with windows.

# windows
➜  containerd git:(main) GOOS=windows make BUILDTAGS="no_aufs no_btrfs" bin/containerd.exe
+ bin/containerd.exe
go build  -gcflags=-trimpath=/home/weifu/go/src  -o bin/containerd.exe -ldflags '-X github.com/containerd/containerd/version.Version=v1.7.0-rc.2-6-g29e10a192 -X github.com/containerd/containerd/version.Revision=29e10a192a676628080dd79b9500e609df3b470f -X github.com/containerd/containerd/version.Package=github.com/containerd/containerd -s -w ' -tags "no_aufs no_btrfs urfave_cli_no_docs"  ./cmd/containerd
➜  containerd git:(main) file bin/containerd.exe
bin/containerd.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
➜  containerd git:(main) go version -m bin/containerd.exe | grep cgroups
        dep     github.com/containerd/cgroups   v1.1.0  h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 8, 2023

@fuweid
Copy link
Member

fuweid commented Mar 8, 2023

Looks like hcsshim has to be updated too
https://github.com/microsoft/hcsshim/blob/v0.10.0-rc.7/go.mod#L14

Windows doesn't use cgroupsv3 and typeurl/v2 is compatible with typeurl@v1.x.x. So it is ok to ship with typeurl's old version here.

@fuweid
Copy link
Member

fuweid commented Mar 8, 2023

File a #8234 to support nerdctl to use cgroupsv3.

@thaJeztah
Copy link
Member

Any chance of #8224 making it into this one?

@thaJeztah
Copy link
Member

@fuweid for the cgroups "v3", I did some "naive" swapping of imports in hcsshim, but not sure how far I got, and it may be very incorrect; if someone wants to carry my changes, definitely feel free to though; I pushed my "WIP" branch, but never found the time to fully dive into it; see microsoft/hcsshim#1618

@thaJeztah
Copy link
Member

thaJeztah commented Mar 8, 2023

Before I forget; did someone already open a PR to update Go to 1.20.2? (I didn't come round to go my round of updates yet, but there were some security fixes in it) https://groups.google.com/g/golang-announce/c/3-TpUx48iQY

@fuweid
Copy link
Member

fuweid commented Mar 8, 2023

@fuweid for the cgroups "v3", I did some "naive" swapping of imports in hcsshim, but not sure how far I got, and it may be very incorrect; if someone wants to carry my changes, definitely feel free to though; I pushed my "WIP" branch, but never found the time to fully dive into it; see microsoft/hcsshim#1618

@thaJeztah I will take a look. But no sure that we can make it in time😂

@dmcgowan dmcgowan merged commit 8cc09e6 into containerd:main Mar 9, 2023
@dmcgowan dmcgowan deleted the prepare-v1.7.0-rc.3 branch April 20, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants