Skip to content

Commit

Permalink
Merge tag 'v1.6.19' into release-4.13
Browse files Browse the repository at this point in the history
containerd 1.6.19

Welcome to the v1.6.19 release of containerd!

The nineteenth patch release for containerd 1.6 contains runtime fixes and additions for Windows platforms

* **Update hcsshim to v0.9.7 to include fix for graceful termination and pause containers ([containerd#8153](containerd#8153))

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.

* Kirtana Ashok
* Derek McGowan
* Wei Fu

<details><summary>4 commits</summary>
<p>

* [release/1.6] Prepare release notes for v1.6.19 ([containerd#8157](containerd#8157))
  * [`23e94075a`](containerd@23e9407) Add release notes for v1.6.19
* [release/1.6] go.mod: Bump hcsshim to v0.9.7 ([containerd#8153](containerd#8153))
  * [`f488a6241`](containerd@f488a62) Update hcsshim tag to v0.9.7
</p>
</details>

* **github.com/Microsoft/hcsshim**  v0.9.6 -> v0.9.7

Previous release can be found at [v1.6.18](https://github.com/containerd/containerd/releases/tag/v1.6.18)
  • Loading branch information
aravindhp committed Feb 28, 2023
2 parents 2d3127c + 1e1ea6e commit d594a39
Show file tree
Hide file tree
Showing 45 changed files with 950 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18.10'
go-version: '1.19.6'

- uses: actions/checkout@v3
with:
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
# Go version we currently use to build containerd across all CI.
# Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
GO_VERSION: '1.18.10'
GO_VERSION: '1.19.6'

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
#
project:
name: Project Checks
if: github.repository == 'containerd/containerd'
runs-on: ubuntu-20.04
timeout-minutes: 5

Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
# Make sure binaries compile with other platforms
crossbuild:
name: Crossbuild Binaries
needs: [project, linters, protos, man]
needs: [linters, protos, man]
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
Expand Down Expand Up @@ -227,12 +228,12 @@ jobs:
name: Binaries
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: [project, linters, protos, man]
needs: [linters, protos, man]

strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2019, windows-2022]
go-version: ["1.17.13", "1.18.10"]
go-version: ["1.17.13", "1.19.6"]
steps:
- name: Install dependencies
if: matrix.os == 'ubuntu-20.04'
Expand Down Expand Up @@ -267,7 +268,7 @@ jobs:
name: Windows Integration
runs-on: ${{ matrix.os }}
timeout-minutes: 35
needs: [project, linters, protos, man]
needs: [linters, protos, man]
env:
GOTEST: gotestsum --

Expand Down Expand Up @@ -356,7 +357,7 @@ jobs:
name: Linux Integration
runs-on: ubuntu-20.04
timeout-minutes: 40
needs: [project, linters, protos, man]
needs: [linters, protos, man]

strategy:
fail-fast: false
Expand Down Expand Up @@ -486,7 +487,7 @@ jobs:
name: MacOS unit tests
runs-on: macos-12
timeout-minutes: 10
needs: [project, linters, protos, man]
needs: [linters, protos, man]
env:
GOTEST: gotestsum --

Expand All @@ -512,7 +513,7 @@ jobs:
# nested virtualization is only available on macOS hosts
runs-on: macos-12
timeout-minutes: 45
needs: [project, linters, protos, man]
needs: [linters, protos, man]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -583,7 +584,7 @@ jobs:
# nested virtualization is only available on macOS hosts
runs-on: macos-12
timeout-minutes: 45
needs: [project, linters, protos, man]
needs: [linters, protos, man]
steps:
- uses: actions/checkout@v3

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions: # added using https://github.com/step-security/secure-workflows

jobs:
CodeQL-Build:

if: github.repository == 'containerd/containerd'
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
Expand All @@ -33,7 +33,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: 1.18.10
go-version: 1.19.6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18.10'
go-version: '1.19.6'

- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '.github/workflows/nightly.yml'

env:
GO_VERSION: '1.18.10'
GO_VERSION: '1.19.6'

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
name: Containerd Release

env:
GO_VERSION: '1.18.10'
GO_VERSION: '1.19.6'

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ EOF
config.vm.provision "install-golang", type: "shell", run: "once" do |sh|
sh.upload_path = "/tmp/vagrant-install-golang"
sh.env = {
'GO_VERSION': ENV['GO_VERSION'] || "1.18.10",
'GO_VERSION': ENV['GO_VERSION'] || "1.19.6",
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
Expand Down
2 changes: 1 addition & 1 deletion api/services/content/v1/content.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cmd/ctr/commands/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ var Command = cli.Command{
Flags: append([]cli.Flag{
cli.BoolFlag{
Name: "rm",
Usage: "remove the container after running",
Usage: "remove the container after running, cannot be used with --detach",
},
cli.BoolFlag{
Name: "null-io",
Expand All @@ -109,7 +109,7 @@ var Command = cli.Command{
},
cli.BoolFlag{
Name: "detach,d",
Usage: "detach from the task after it has started execution",
Usage: "detach from the task after it has started execution, cannot be used with --rm",
},
cli.StringFlag{
Name: "fifo-dir",
Expand All @@ -136,6 +136,7 @@ var Command = cli.Command{
id string
ref string

rm = context.Bool("rm")
tty = context.Bool("tty")
detach = context.Bool("detach")
config = context.IsSet("config")
Expand All @@ -158,6 +159,10 @@ var Command = cli.Command{
if id == "" {
return errors.New("container id must be provided")
}
if rm && detach {
return errors.New("flags --detach and --rm cannot be specified together")
}

client, ctx, cancel, err := commands.NewClient(context)
if err != nil {
return err
Expand All @@ -167,7 +172,7 @@ var Command = cli.Command{
if err != nil {
return err
}
if context.Bool("rm") && !detach {
if rm && !detach {
defer container.Delete(ctx, containerd.WithSnapshotCleanup)
}
var con console.Console
Expand Down
2 changes: 1 addition & 1 deletion contrib/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# docker build -t containerd-test --build-arg RUNC_VERSION=v1.0.0-rc94 -f Dockerfile.test ../

ARG GOLANG_VERSION=1.18.10
ARG GOLANG_VERSION=1.19.6
ARG GOLANG_IMAGE=golang

FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang
Expand Down
18 changes: 18 additions & 0 deletions docs/hosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ $ tree /etc/containerd/certs.d
└── hosts.toml
```

Optionally the `_default` registry host namespace can be used as a fallback, if no
other namespace matches.

The `/v2` portion of the pull request format shown above refers to the version of the
distribution api. If not included in the pull request, `/v2` is added by default for all
clients compliant to the distribution specification linked above.
Expand Down Expand Up @@ -155,6 +158,21 @@ server = "https://registry-1.docker.io" # Exclude this to not use upstream
ca = "docker-mirror.crt" # Or absolute path /etc/containerd/certs.d/docker.io/docker-mirror.crt
```

### Setup Default Mirror for All Registries

```
$ tree /etc/containerd/certs.d
/etc/containerd/certs.d
└── _default
└── hosts.toml
$ cat /etc/containerd/certs.d/_default/hosts.toml
server = "https://registry.example.com"
[host."https://registry.example.com"]
capabilities = ["pull", "resolve"]
```

### Bypass TLS Verification Example

To bypass the TLS verification for a private registry at `192.168.31.250:5000`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8
github.com/Microsoft/go-winio v0.5.2
github.com/Microsoft/hcsshim v0.9.6
github.com/Microsoft/hcsshim v0.9.7
github.com/containerd/aufs v1.0.0
github.com/containerd/btrfs v1.0.0
github.com/containerd/cgroups v1.0.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwT
github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4=
github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg=
github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc=
github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY=
github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc=
github.com/Microsoft/hcsshim v0.9.7 h1:mKNHW/Xvv1aFH87Jb6ERDzXTJTLPlmzfZ28VBFD/bfg=
github.com/Microsoft/hcsshim v0.9.7/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc=
github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
Expand Down
12 changes: 7 additions & 5 deletions images/archive/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@ func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opt
return writeManifest(ctx, store, idx, ocispec.MediaTypeImageIndex)
}

const (
kib = 1024
mib = 1024 * kib
jsonLimit = 20 * mib
)

func onUntarJSON(r io.Reader, j interface{}) error {
b, err := io.ReadAll(r)
if err != nil {
return err
}
return json.Unmarshal(b, j)
return json.NewDecoder(io.LimitReader(r, jsonLimit)).Decode(j)
}

func onUntarBlob(ctx context.Context, r io.Reader, store content.Ingester, size int64, ref string) (digest.Digest, error) {
Expand Down

1 comment on commit d594a39

@aravindhp
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 There was merge conflict due to containerd#8054 and the carry patch #2 that had to be manually resolved.

Please sign in to comment.