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

WiP: go.{mod,sum}: update NRI deps, re-vendor (temporarily diverted r… #9

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
004f395
core/mount: Use MNT_DETACH for umount of tmp layers
rata Sep 23, 2024
f8d84ec
core/mount: Prevent accidental removal of rootfs files
rata Sep 23, 2024
30f2893
core/mount: Only remove dirs if unmount succeeded
rata Sep 24, 2024
e479431
core/runtime: Fix a typo in error message
coolljt0725 Oct 5, 2024
7b18098
Update runner images to macOS13
austinvazquez Oct 7, 2024
d2565d4
Merge pull request #10781 from austinvazquez/upgrade-macos-runner-image
estesp Oct 7, 2024
8701137
Merge pull request #10777 from coolljt0725/fix_typo
estesp Oct 7, 2024
46f5a0d
update to go1.23.2,go1.22.8
austinvazquez Oct 4, 2024
f0f1bfc
update runc binary to 1.1.15
samuelkarp Oct 7, 2024
9c42dd9
build(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1
dependabot[bot] Oct 7, 2024
ce648b5
Merge pull request #10787 from samuelkarp/runc-1.1.15
samuelkarp Oct 8, 2024
179b8d9
Merge pull request #10772 from austinvazquez/update-golang-1.23.2
AkihiroSuda Oct 8, 2024
6c4102f
Merge pull request #10790 from containerd/dependabot/go_modules/googl…
AkihiroSuda Oct 8, 2024
428df99
build(deps): bump google.golang.org/grpc from 1.67.0 to 1.67.1
dependabot[bot] Oct 8, 2024
2483108
Merge pull request #10791 from containerd/dependabot/go_modules/googl…
AkihiroSuda Oct 9, 2024
f89ed3c
build(deps): bump golang.org/x/sys in the golang-x group
dependabot[bot] Oct 9, 2024
ce7c473
Merge pull request #10788 from containerd/dependabot/go_modules/golan…
AkihiroSuda Oct 9, 2024
ee92168
Switch from actuated.dev to GH Action runners for arm64
estesp Oct 11, 2024
08037e7
Merge pull request #10821 from estesp/switch-arm-runners
AkihiroSuda Oct 11, 2024
e2daa20
Revert "use older version of OVMF package"
AkihiroSuda Oct 11, 2024
38beeb3
Revert "use vagrant from jammy in noble"
AkihiroSuda Oct 11, 2024
4d02217
CI: fix "Unable to find a source package for vagrant" error
AkihiroSuda Oct 11, 2024
1db0064
CI: install OVMF for Vagrant
AkihiroSuda Oct 11, 2024
61f91b9
Merge pull request #10817 from AkihiroSuda/fix-10816
AkihiroSuda Oct 12, 2024
b7c333c
Revert "update runc binary to 1.1.15"
samuelkarp Oct 15, 2024
36ae5f9
Merge pull request #10721 from rata/issue-10704
fuweid Oct 15, 2024
5d49f2e
Merge pull request #10838 from samuelkarp/revert-runc-1.1.15
fuweid Oct 15, 2024
c3d84a8
build(deps): bump the otel group with 8 updates
dependabot[bot] Oct 15, 2024
8b41368
Merge pull request #10830 from containerd/dependabot/go_modules/otel-…
AkihiroSuda Oct 16, 2024
4bd3a71
go.{mod,sum}: update NRI deps and re-vendor.
klihub Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.23.1"
"version": "1.23.2"
}
},

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/install-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Reusable action to install Go, so there is one place to bump Go ve
inputs:
go-version:
required: true
default: "1.23.1"
default: "1.23.2"
description: "Go version to install"

runs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
name: API Release

env:
GO_VERSION: "1.23.1"
GO_VERSION: "1.23.2"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down
52 changes: 15 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:

strategy:
matrix:
os: [ubuntu-24.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019]
os: [ubuntu-24.04, arm64-8core-32gb, macos-13, windows-2019]
exclude:
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}
- os: ${{ github.repository != 'containerd/containerd' && 'arm64-8core-32gb' }}


steps:
Expand Down Expand Up @@ -190,10 +190,10 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
go-version: ["1.22.7", "1.23.1"]
os: [ubuntu-22.04, ubuntu-24.04, arm64-8core-32gb, macos-13, windows-2019, windows-2022]
go-version: ["1.22.8", "1.23.2"]
exclude:
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}
- os: ${{ github.repository != 'containerd/containerd' && 'arm64-8core-32gb' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-go
Expand Down Expand Up @@ -388,9 +388,9 @@ jobs:
runtime:
- io.containerd.runc.v2
runc: [runc, crun]
os: [ubuntu-22.04, ubuntu-24.04, actuated-arm64-4cpu-16gb]
os: [ubuntu-22.04, ubuntu-24.04, arm64-8core-32gb]
exclude:
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}
- os: ${{ github.repository != 'containerd/containerd' && 'arm64-8core-32gb' }}
cgroup_driver: [cgroupfs, systemd]

env:
Expand All @@ -412,10 +412,10 @@ jobs:
script/setup/install-failpoint-binaries

- name: Install criu
# NOTE: Required actuated enable CONFIG_CHECKPOINT_RESTORE
# NOTE: Required arm64 enable CONFIG_CHECKPOINT_RESTORE (need to confirm GitHub action runners config)
#
# REF: https://criu.org/Linux_kernel
if: matrix.os != 'actuated-arm64-4cpu-16gb'
if: matrix.os != 'arm64-8core-32gb'
run: |
sudo add-apt-repository -y ppa:criu/ppa
sudo apt-get update
Expand Down Expand Up @@ -491,12 +491,6 @@ jobs:
runc --version
CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration

- name: Fix up for actuated
# https://github.com/containerd/containerd/pull/9920#issuecomment-2024823587
if: ${{ (matrix.os == 'actuated-arm64-4cpu-16gb') && (matrix.runc == 'crun') }}
run: |
echo "EXTRA_CRITEST_OPTIONS=--ginkgo.skip=runtime should support NamespaceMode_POD" >> $GITHUB_ENV

- name: cri-tools critest
env:
TEST_RUNTIME: ${{ matrix.runtime }}
Expand Down Expand Up @@ -569,30 +563,14 @@ jobs:
# Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828
# So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com jammy main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
# we use vagrant from jammy since the sources are not yet available in noble for vagrant
# TODO: once vagrant package sources are available in ubuntu-24 this can be removed
sudo tee -a /etc/apt/sources.list.d/ubuntu.sources <<EOF
Types: deb deb-src
URIs: http://archive.ubuntu.com/ubuntu
Suites: jammy
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
echo "" | sudo tee -a /etc/apt/sources.list.d/ubuntu.sources > /dev/null
# jammy security needs to be added so that the compatible ovmf package can be fetched
sudo tee -a /etc/apt/sources.list.d/ubuntu.sources <<EOF
Types: deb deb-src
URIs: http://security.archive.ubuntu.com/ubuntu
Suites: jammy-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
sudo apt-get update
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf=2022.02-3ubuntu0.22.04.2
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/
sudo systemctl enable --now libvirtd
sudo apt-get build-dep -y vagrant ruby-libvirt
sudo apt-get build-dep -y ruby-libvirt
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
sudo vagrant plugin install vagrant-libvirt
- name: Boot VM
Expand Down Expand Up @@ -659,7 +637,7 @@ jobs:

tests-mac-os:
name: MacOS unit tests
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 10
needs: [project, linters, protos, man]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
name: Release

env:
GO_VERSION: "1.23.1"
GO_VERSION: "1.23.2"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand Down
7 changes: 5 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ Vagrant.configure("2") do |config|
v.memory = memory
v.cpus = cpus
v.machine_virtual_size = disk_size
v.loader = "/usr/share/OVMF/OVMF_CODE.fd"
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
# Needs `sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/`
v.loader = '/usr/share/OVMF/OVMF_CODE_4M.fd'
v.nvram = '/var/lib/libvirt/qemu/nvram/OVMF_VARS_4M.fd'
end

config.vm.synced_folder ".", "/vagrant", type: "rsync"
Expand Down Expand Up @@ -104,7 +107,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.23.1",
'GO_VERSION': ENV['GO_VERSION'] || "1.23.2",
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
Expand Down
2 changes: 1 addition & 1 deletion contrib/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# docker run --privileged --group-add keep-groups -v ./critest_exit_code.txt:/tmp/critest_exit_code.txt containerd-test
# ------------------------------------------------------------------------------

ARG GOLANG_VERSION=1.23.1
ARG GOLANG_VERSION=1.23.2
ARG GOLANG_IMAGE=golang

FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang
Expand Down
4 changes: 2 additions & 2 deletions contrib/fuzz/oss_fuzz_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ go run main.go --target_dir $SRC/containerd/images

apt-get update && apt-get install -y wget
cd $SRC
wget --quiet https://go.dev/dl/go1.23.1.linux-amd64.tar.gz
wget --quiet https://go.dev/dl/go1.23.2.linux-amd64.tar.gz

mkdir temp-go
rm -rf /root/.go/*
tar -C temp-go/ -xzf go1.23.1.linux-amd64.tar.gz
tar -C temp-go/ -xzf go1.23.2.linux-amd64.tar.gz
mv temp-go/go/* /root/.go/
cd $SRC/containerd

Expand Down
16 changes: 13 additions & 3 deletions core/mount/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,22 @@ func doPrepareIDMappedOverlay(lowerDirs []string, usernsFd int) (tmpLowerDirs []
}
cleanUp := func() {
for _, lowerDir := range tmpLowerDirs {
if err := unix.Unmount(lowerDir, 0); err != nil {
// Do a detached unmount so even if the resource is busy, the mount will be
// gone (eventually) and we can safely delete the directory too.
if err := unix.Unmount(lowerDir, unix.MNT_DETACH); err != nil {
log.L.WithError(err).Warnf("failed to unmount temp lowerdir %s", lowerDir)
continue
}
// Using os.Remove() so if it's not empty, we don't delete files in the
// rootfs.
if err := os.Remove(lowerDir); err != nil {
log.L.WithError(err).Warnf("failed to remove temporary overlay lowerdir's")
}
}
if terr := os.RemoveAll(filepath.Clean(filepath.Join(tmpLowerDirs[0], ".."))); terr != nil {
log.L.WithError(terr).Warnf("failed to remove temporary overlay lowerdir's")

// This dir should be empty now. Otherwise, we don't do anything.
if err := os.Remove(filepath.Join(tmpLowerDirs[0], "..")); err != nil {
log.L.WithError(err).Infof("failed to remove temporary overlay dir")
}
}
for i, lowerDir := range lowerDirs {
Expand Down
2 changes: 1 addition & 1 deletion core/runtime/v2/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func loadShim(ctx context.Context, bundle *Bundle, onClose func()) (_ ShimInstan

params, err := restoreBootstrapParams(bundle.Path)
if err != nil {
return nil, fmt.Errorf("failed to read boostrap.json when restoring bundle %q: %w", bundle.ID, err)
return nil, fmt.Errorf("failed to read bootstrap.json when restoring bundle %q: %w", bundle.ID, err)
}

conn, err := makeConnection(ctx, bundle.ID, params, onCloseWithShimLog)
Expand Down
40 changes: 20 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ require (
github.com/containerd/go-runc v1.1.0
github.com/containerd/imgcrypt v1.2.0-rc1
github.com/containerd/log v0.1.0
github.com/containerd/nri v0.6.1
github.com/containerd/nri v0.6.2-0.20241010080438-159f5754db39
github.com/containerd/otelttrpc v0.0.0-20240305015340-ea5083fda723
github.com/containerd/platforms v0.2.1
github.com/containerd/plugin v0.1.0
github.com/containerd/ttrpc v1.2.5
github.com/containerd/ttrpc v1.2.6-0.20240827082320-b5cd6e4b3287
github.com/containerd/typeurl/v2 v2.2.0
github.com/containernetworking/cni v1.2.3
github.com/containernetworking/plugins v1.5.1
Expand Down Expand Up @@ -62,20 +62,20 @@ require (
github.com/urfave/cli/v2 v2.27.4
github.com/vishvananda/netlink v1.3.0
go.etcd.io/bbolt v1.3.11
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0
go.opentelemetry.io/otel v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0
go.opentelemetry.io/otel/sdk v1.31.0
go.opentelemetry.io/otel/trace v1.31.0
golang.org/x/mod v0.21.0
golang.org/x/sync v0.8.0
golang.org/x/sys v0.25.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.67.0
google.golang.org/protobuf v1.34.2
golang.org/x/sys v0.26.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
k8s.io/apimachinery v0.31.1
k8s.io/client-go v0.31.1
k8s.io/component-base v0.31.1
Expand Down Expand Up @@ -129,16 +129,16 @@ require (
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading