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

Upgrade Garden to Containerd v2.0 #368

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2ef80df
Add containerd 2.0 to submodules
MarcPaquette Dec 6, 2024
e9e84a3
Packaging scripts to use submoduled Containerd 2.0
MarcPaquette Dec 6, 2024
f56bbb3
Update configuration files to V2 for Containerd
MarcPaquette Dec 13, 2024
e782a90
Fix RunC packaging
MarcPaquette Dec 18, 2024
e553597
Simplify containerd v2 configuration file
MarcPaquette Jan 9, 2025
9d5f847
Remove Xenial workarounds
MarcPaquette Jan 9, 2025
fd61f0b
Release v1.65.0
tas-runtime-bot Dec 20, 2024
689cddb
bump dontpanic garden garden-integration-tests garden-performance-acc…
tas-runtime-bot Dec 20, 2024
e110ff8
Update go.mod dependencies
tas-runtime-bot Dec 20, 2024
7b5018c
Update go.mod dependencies
tas-runtime-bot Dec 20, 2024
db16b48
Sync package specs
tas-runtime-bot Dec 20, 2024
bcc7446
bump dontpanic garden garden-integration-tests garden-performance-acc…
tas-runtime-bot Dec 25, 2024
75ec0a7
Update go.mod dependencies
tas-runtime-bot Dec 25, 2024
1ca697b
Update go.mod dependencies
tas-runtime-bot Dec 25, 2024
a9743a7
bump dontpanic garden garden-integration-tests garden-performance-acc…
tas-runtime-bot Jan 1, 2025
6fec8b5
Update go.mod dependencies
tas-runtime-bot Jan 1, 2025
678531b
Update go.mod dependencies
tas-runtime-bot Jan 1, 2025
55050f9
Release v1.66.0
tas-runtime-bot Jan 3, 2025
7d1c94f
fix path for bash functions
winkingturtle-vmw Jan 7, 2025
4e45178
bump dontpanic garden garden-integration-tests garden-performance-acc…
tas-runtime-bot Jan 8, 2025
3c5ad16
Update go.mod dependencies
tas-runtime-bot Jan 8, 2025
c4f8050
Update go.mod dependencies
tas-runtime-bot Jan 8, 2025
6871576
bump garden-integration-tests garden-performance-acceptance-tests gro…
tas-runtime-bot Jan 10, 2025
3131608
Sync package specs
tas-runtime-bot Jan 10, 2025
1c74454
bump garden-integration-tests grootfs guardian
tas-runtime-bot Jan 14, 2025
6d8c838
Sync package specs
tas-runtime-bot Jan 14, 2025
fae38f2
bump garden-integration-tests guardian
tas-runtime-bot Jan 14, 2025
eea2454
Sync package specs
tas-runtime-bot Jan 14, 2025
798c3c3
bump garden-integration-tests grootfs
tas-runtime-bot Jan 15, 2025
7428f42
Setup cgroups v2 controllers inside docker container
mariash Nov 18, 2024
a5c0f48
bump garden garden-integration-tests garden-performance-acceptance-te…
tas-runtime-bot Jan 16, 2025
e85ed7d
Update go.mod dependencies
tas-runtime-bot Jan 16, 2025
6e47a92
bump garden-integration-tests garden-performance-acceptance-tests gua…
tas-runtime-bot Jan 16, 2025
98cda38
Upgrade golang-1.23-linux (1.23.5)
tas-runtime-bot Jan 16, 2025
38a96ef
Upgrade golang-1.23-windows (1.23.5)
tas-runtime-bot Jan 16, 2025
4251f92
Release v1.67.0
tas-runtime-bot Jan 17, 2025
ce0b417
Sync package specs
tas-runtime-bot Jan 10, 2025
ea7d8e6
Fix RunC packaging
MarcPaquette Dec 18, 2024
0105bfb
Merge branch 'develop' into WIP-containerd-2.0
MarcPaquette Jan 17, 2025
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
path = src/garden-performance-acceptance-tests
url = https://github.com/cloudfoundry/garden-performance-acceptance-tests
branch = main
[submodule "src/containerd"]
path = src/containerd
url = https://github.com/containerd/containerd.git
branch = release/2.0
2 changes: 1 addition & 1 deletion jobs/garden/templates/bin/containerd_utils.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ start_containerd() {

echo "$!" > "$CONTAINERD_PIDFILE"

address=$(grep containerd.sock $containerd_config_filepath | awk '{print $3}' | tr -d '"')
address=$(grep containerd.sock $containerd_config_filepath | awk '{print $3}' | tr -d \')
while ! /var/vcap/packages/containerd/bin/ctr -a $address --connect-timeout 100ms c ls; do
log "waiting for containerd to become available"
sleep 0.1
Expand Down
55 changes: 27 additions & 28 deletions jobs/garden/templates/config/containerd.toml.erb
MarcPaquette marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
root = "/var/vcap/data/containerd/root"
state = "/var/vcap/sys/run/containerd/state"
subreaper = true
version = 3
root = '/var/vcap/data/containerd/root'
state = '/var/vcap/sys/run/containerd/state'
disabled_plugins = ['io.containerd.snapshotter.v1.aufs',
'io.containerd.snapshotter.v1.devmapper',
'io.containerd.snapshotter.v1.overlayfs',
'io.containerd.snapshotter.v1.zfs',
'io.containerd.grpc.v1.walking',
'io.containerd.gc.v1.scheduler',
'io.containerd.service.v1.diff-service',
'io.containerd.service.v1.images-service',
'io.containerd.service.v1.namespaces-service',
'io.containerd.service.v1.snapshots-service',
'io.containerd.grpc.v1.diff',
'io.containerd.grpc.v1.healthcheck',
'io.containerd.grpc.v1.images',
'io.containerd.grpc.v1.namespaces',
'io.containerd.grpc.v1.snapshots',
'io.containerd.grpc.v1.version',
'io.containerd.grpc.v1.cri',
'io.containerd.grpc.v1.leases',
'io.containerd.service.v1.leases-service',
'io.containerd.internal.v1.restart']

oom_score = -999
disabled_plugins = [
"aufs",
"devmapper",
"overlayfs",
"zfs",
"walking",
"scheduler",
"diff-service",
"images-service",
"namespaces-service",
"snapshots-service",
"diff",
"healthcheck",
"images",
"namespaces",
"snapshots",
"version",
"cri",
"leases",
"leases-service",
"restart",
]

[grpc]
address = "/var/vcap/sys/run/containerd/containerd.sock"
address = '/var/vcap/sys/run/containerd/containerd.sock'

[debug]
address = "/var/vcap/sys/run/containerd/debug.sock"
level = "info"
address = '/var/vcap/sys/run/containerd/debug.sock'
level = 'info'
4 changes: 1 addition & 3 deletions packages/containerd/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ source /var/vcap/packages/golang-*-linux/bosh/compile.env
mkdir -p "${BOSH_INSTALL_TARGET}/bin"
export GOBIN="${BOSH_INSTALL_TARGET}/bin"

pushd src/guardian/vendor/github.com/containerd/containerd
pushd src/containerd
BUILDTAGS=no_btrfs make ./bin/containerd
BUILDTAGS=no_btrfs make ./bin/containerd-shim
BUILDTAGS=no_btrfs make ./bin/containerd-shim-runc-v1
BUILDTAGS=no_btrfs make ./bin/containerd-shim-runc-v2
BUILDTAGS=no_btrfs make ./bin/ctr
cp -R bin "${BOSH_INSTALL_TARGET}"
Expand Down
840 changes: 2 additions & 838 deletions packages/containerd/spec

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions packages/runc/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,7 @@ source /var/vcap/packages/golang-*-linux/bosh/compile.env
mkdir -p "${BOSH_INSTALL_TARGET}/bin"
export GOBIN="${BOSH_INSTALL_TARGET}/bin"

. /etc/lsb-release
if [[ "${DISTRIB_CODENAME}" == "xenial" ]]; then
patch -r Makefile-xenial.rej -F 0 \
src/guardian/vendor/github.com/opencontainers/runc/Makefile \
src/runc-patches/Makefile-xenial.patch \
>&2 || true >&2
# there are cases where patch can return 0, but will still generate a .rej file since
# it tried to be smart and figure out how to apply the patch. We'd like to err on the side
# of failure and requiring human eyes just in case. As a result, we ignore the exit code,
# and look for the reject file to tell us things failed.
if [[ -f Makefile-xenial.rej ]]; then
echo "Patching Makefile with Makefile-xenial.patch failed" >&2
echo "Please resolve the issue manually until patching succeeds and does not generate a .rej file:" >&2
echo "'patch -r Makefile-xenial.rej -F 0 src/guardian/vendor/github.com/opencontainers/runc/Makefile src/runc-patches/Makefile-xenial.patch' succeeds" >&2
exit 1
fi
fi

pushd src/guardian/vendor/github.com/opencontainers/runc
make BUILDTAGS='seccomp apparmor' static
make static
cp runc "${GOBIN}/runc"
popd
1 change: 0 additions & 1 deletion packages/runc/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies:
- pkg-config

files:
- runc-patches/*.patch
- guardian/go.mod
Copy link
Contributor

Choose a reason for hiding this comment

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

I think runc-patches also needs to be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw that.. Seemed slightly out of scope for the work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Runc patches are now removed.

- guardian/go.sum
- guardian/vendor/modules.txt
Expand Down
1 change: 1 addition & 0 deletions src/containerd
Submodule containerd added at 154b69
31 changes: 0 additions & 31 deletions src/runc-patches/Makefile-xenial.patch

This file was deleted.