Skip to content

Commit

Permalink
Update "opt disabling" patch to remove "opt" plugin entirely
Browse files Browse the repository at this point in the history
Also, update testing to reproduce the original failure and validate that "opt" is successfully gone. 🚀
  • Loading branch information
tianon committed May 24, 2024
1 parent 8c2803a commit 9ff831d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
6 changes: 6 additions & 0 deletions moby-containerd/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
moby-containerd (1.6.32-2) UNRELEASED; urgency=medium

* Update "opt disabling" patch to remove "opt" plugin entirely

-- Tianon Gravi <[email protected]> Fri, 24 May 2024 13:50:41 -0700

moby-containerd (1.6.32-1) unstable; urgency=medium

* Update to 1.6.32
Expand Down
16 changes: 0 additions & 16 deletions moby-containerd/debian/patches/disable-opt-plugin.patch

This file was deleted.

15 changes: 15 additions & 0 deletions moby-containerd/debian/patches/remove-opt-plugin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Subject: remove "opt" plugin ("ctr install")
Forwarded: no; this is very intentional upstream behavior (https://github.com/containerd/containerd/commit/1537f31381b946f395348d9891602a1e4a2c1070) that we just disagree with having/supporting

diff --git a/cmd/containerd/builtins.go b/cmd/containerd/builtins.go
index 4b588fc30..58fac4734 100644
--- a/cmd/containerd/builtins.go
+++ b/cmd/containerd/builtins.go
@@ -32,7 +32,6 @@ import (
_ "github.com/containerd/containerd/services/introspection"
_ "github.com/containerd/containerd/services/leases"
_ "github.com/containerd/containerd/services/namespaces"
- _ "github.com/containerd/containerd/services/opt"
_ "github.com/containerd/containerd/services/snapshots"
_ "github.com/containerd/containerd/services/tasks"
_ "github.com/containerd/containerd/services/version"
2 changes: 1 addition & 1 deletion moby-containerd/debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
arm64-v8.patch
disable-opt-plugin.patch
remove-opt-plugin.patch
service-execstart.patch
21 changes: 18 additions & 3 deletions test-debs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,36 @@ cat <<-'EOBASH'
apt-get update -qq
arch="$(dpkg --print-architecture)"
apt-get install -yqq --no-install-recommends -V ca-certificates iptables /debs/moby-*_"${arch}".deb
apt-get install -yqq --no-install-recommends -V ca-certificates iptables git /debs/moby-*_"${arch}".deb
containerd --version
ctr --version
docker --version
docker buildx version
runc --version
containerd &
containerd & pid="$!"
timeout 10s sh -c "while ! ctr version; do sleep 1; done"
if ctr plugins ls | grep opt; then
exit 1
fi
ctr image pull docker.io/library/hello-world:latest
ctr run --rm docker.io/library/hello-world:latest hello
# stop "containerd" so dockerd can start it up and we can test the "dockerd starts/manages containerd" behavior
kill "$pid"
wait "$pid"
# TODO also clear out containerd state?
dockerd &
timeout 10s sh -c "while ! docker version; do sleep 1; done"
if ctr -a /run/docker/containerd/containerd.sock plugins ls | grep opt; then
exit 1
fi
docker run --rm hello-world
docker run --rm --init hello-world
Expand All @@ -66,7 +79,9 @@ cat <<-'EOBASH'
docker buildx create --name tianon --node tianon --driver docker-container --driver-opt image=tianon/buildkit --bootstrap
printf 'FROM hello-world\nRUN ["/hello"]' | docker buildx build --builder tianon --tag hello-build:buildx -
docker image inspect --format '.' hello-build:classic hello-build:buildkit hello-build:buildx > /dev/null
docker buildx build --tag hello-build:buildx-git 'https://github.com/docker-library/hello-world.git#3fb6ebca4163bf5b9cc496ac3e8f11cb1e754aee:amd64/hello-world'
docker image inspect --format '.' hello-build:classic hello-build:buildkit hello-build:buildx hello-build:buildx-git > /dev/null
docker images
EOBASH
Expand Down

0 comments on commit 9ff831d

Please sign in to comment.