Skip to content

[master] verify: remove workaround for containerd-shim 1.6's missing "-v" flag#1044

Merged
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:verify_containerd_1.7
Aug 8, 2024
Merged

[master] verify: remove workaround for containerd-shim 1.6's missing "-v" flag#1044
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:verify_containerd_1.7

Conversation

@thaJeztah
Copy link
Member

The containerd-shim binary that's shipped with containerd 1.6 did not provide a -v flag to show the version, so f1f6f22 used --help as alternative.

Now that we package containerd 1.7, we can use the -v flag instead;

containerd-shim -v
containerd-shim
  Version:  1.7.19
  Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
  Go version: go1.21.12

The containerd-shim binary that's shipped with containerd 1.6 did not provide
a `-v` flag to show the version, so f1f6f22
used `--help` as alternative.

Now that we package containerd 1.7, we can use the `-v` flag instead;

    containerd-shim -v
    containerd-shim
      Version:  1.7.19
      Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
      Go version: go1.21.12

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah self-assigned this Aug 6, 2024
@thaJeztah
Copy link
Member Author

CI Looks happy;

+ verify_binaries
+ docker --version
Docker version 0.0.0-20240802102606-78de7da, build 78de7da
+ docker buildx version
github.com/docker/buildx v0.16.2 99dea6d
+ docker compose version
Docker Compose version v2.29.1
+ dockerd --version
Docker version 0.0.0-20240802102606-78de7da, build 265f0a7
+ docker-proxy --version
docker-proxy (commit 265f0a7) version 0.0.0-20240802102606-78de7da
+ containerd --version
containerd containerd.io 1.7.19 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
+ ctr --version
ctr containerd.io 1.7.19
+ containerd-shim -v
containerd-shim
  Version:  1.7.19
  Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
  Go version: go1.21.12

+ containerd-shim-runc-v1 -v
containerd-shim-runc-v1:
  Version:  1.7.19
  Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
  Go version: go1.21.12

+ containerd-shim-runc-v2 -v
containerd-shim-runc-v2:
  Version:  1.7.19
  Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
  Go version: go1.21.12

+ runc --version
runc version 1.7.19
commit: v1.1.13-0-g58aa920
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

But, hm.. also reveals some bug, either in containerd-packaging or in the upstream containerd repository; it looks like some VERSION env-var leaks through to the runc build-scripts, resulting in the runc binary to get the version set from the containerd binary;

+ runc --version
runc version 1.7.19
commit: v1.1.13-0-g58aa920
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

@thaJeztah
Copy link
Member Author

Looks like an upstream bug;

curl -fsSLO https://github.com/containerd/containerd/releases/download/v1.7.20/cri-containerd-1.7.20-linux-arm64.tar.gz
tar -xvzf cri-containerd-1.7.20-linux-arm64.tar.gz
# ...
./usr/local/sbin/runc --version
runc version v1.7.20
commit: v1.1.13-0-g58aa9203
spec: 1.0.2-dev
go: go1.21.12
libseccomp: 2.5.5

@thaJeztah
Copy link
Member Author

Well, maybe "both" (both our scripts and containerd ones); I suspect we have the same issue in our scripts as well (perhaps due to changes in upstream runc, but not sure); https://github.com/docker/containerd-packaging/blob/be55b62e9a2fff5a744c392334e05722ff85e876/debian/rules#L46-L49

bin/runc:
	@set -x; make -C /go/src/github.com/opencontainers/runc  --no-print-directory \
		BINDIR="$$(pwd)/bin" \
		runc install

@thaJeztah
Copy link
Member Author

Opened a ticket in containerd;

Given that both 1.6 and 1.7 are impacted, it's also possible that it was a change in runc's Makefile

@thaJeztah
Copy link
Member Author

thaJeztah commented Aug 6, 2024

OK, I think I found the regression point;

Looking at the diff between v1.6.33 and v1.6.34, I don't see any changes in Makefiles or packaging/build scripts; containerd/containerd@v1.6.33...v1.6.34

But there was an update of runc (v1.1.12 -> v1.1.13);

And looking at the changelog; I highly suspect this one may be the culprit

@thaJeztah thaJeztah merged commit 9a1c3c1 into docker:master Aug 8, 2024
@thaJeztah thaJeztah deleted the verify_containerd_1.7 branch August 8, 2024 10:38
@vvoland vvoland mentioned this pull request Aug 9, 2024
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.

2 participants