[v0.8 backport] frontend: fix testMultiStageImplicitFrom to account for busybox changes#3439
Closed
[v0.8 backport] frontend: fix testMultiStageImplicitFrom to account for busybox changes#3439
Conversation
crazy-max
previously approved these changes
Dec 27, 2022
needs fix TestSecurityModeSysfs on cgroup v2
Member
|
https://github.com/moby/buildkit/actions/runs/3788940749/jobs/6442288496#step:7:3762 This branch needs 0f34fc6 Also don't think we should backport to this branch as we don't run buildkit tests on moby/20.10 anyway. |
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (cherry picked from commit 030483a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It looks like there's some changes between `busybox:1.34.0` and up; version
1.34.0 of the image did not have a `/usr/bin` directory (only `/usr/sbin`);
docker run --rm -it busybox:1.34.0 ls -al /usr/
total 12
drwxr-xr-x 3 root root 4096 Sep 13 2021 .
drwxr-xr-x 1 root root 4096 Dec 27 14:45 ..
drwxr-xr-x 2 daemon daemon 4096 Sep 13 2021 sbin
But 1.34.1 and up do;
docker run --rm -it busybox:1.34.1 ls -al usr/
total 16
drwxr-xr-x 4 root root 4096 Dec 21 18:28 .
drwxr-xr-x 1 root root 4096 Dec 27 14:44 ..
drwxr-xr-x 2 root root 4096 Dec 21 18:28 bin
drwxr-xr-x 2 daemon daemon 4096 Dec 21 18:28 sbin
It's not immediately apparent what caused this change, or if it's in
busybox itself, or in the official image only;
mirror/busybox@1_34_0...1_34_1
But either way, this change caused a test to fail:
sandbox.go:238: time="2022-12-27T13:45:25.294022820Z" level=debug msg="> creating 4gr5bno8rj7l3k7h9jxe3jhal [/bin/sh -c mkdir /usr/bin && echo -n foo > /usr/bin/go]" span="[golang 2/2] RUN mkdir /usr/bin && echo -n foo > /usr/bin/go"
sandbox.go:238: time="2022-12-27T13:45:25.433886983Z" level=debug msg="sandbox set key processing took 70.062631ms for container 5b4o358g2ryquk4s6ami38gqo"
sandbox.go:238: mkdir: can't create directory '/usr/bin': File exists
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 34f9898)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
5499176 to
55b69a2
Compare
Member
Author
|
Tried applying that patch, but looks like it still fails on something 🤔 |
This comment was marked as resolved.
This comment was marked as resolved.
See https://github.com/moby/moby/blob/v20.10.21/hack/dind#L28-L38 Fix issue 3265 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (cherry picked from commit e5516c2)
This branch is only used for vendoring in moby/moby, which doesn't use this.
```
=== CONT TestIntegration/TestSecurityModeSysfs/worker=oci/secmode=insecure
client_test.go:685:
Error Trace: client_test.go:685
run.go:171
Error: Received unexpected error:
rpc error: code = Unknown desc = executor failed running [mkdir /sys/fs/cgroup/securitytest]: exit code: 1
github.com/moby/buildkit/util/stack.Enable
/src/util/stack/stack.go:77
github.com/moby/buildkit/util/grpcerrors.FromGRPC
/src/util/grpcerrors/grpcerrors.go:188
github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor
/src/util/grpcerrors/intercept.go:41
google.golang.org/grpc.(*ClientConn).Invoke
/src/vendor/google.golang.org/grpc/call.go:35
github.com/moby/buildkit/api/services/control.(*controlClient).Solve
/src/api/services/control/control.pb.go:1321
github.com/moby/buildkit/client.(*Client).solve.func2
/src/client/solve.go:201
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1571
failed to solve
github.com/moby/buildkit/client.(*Client).solve.func2
/src/client/solve.go:214
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1571
Test: TestIntegration/TestSecurityModeSysfs/worker=oci/secmode=insecure
...
...
sandbox.go:223: time="2023-01-03T10:10:16Z" level=debug msg="> creating 501jemvwbacokctnpm9779p7y [mkdir /sys/fs/cgroup/securitytest]"
sandbox.go:223: mkdir: can't create directory '/sys/fs/cgroup/securitytest': File exists
```
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Member
|
Closing this one as we are not running BuildKit tests on Moby 20.10 branch anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of
It looks like there's some changes between
busybox:1.34.0and up; version 1.34.0 of the image did not have a/usr/bindirectory (only/usr/sbin);But 1.34.1 and up do;
It's not immediately apparent what caused this change, or if it's in busybox itself, or in the official image only;
mirror/busybox@1_34_0...1_34_1
But either way, this change caused a test to fail:
(cherry picked from commit 34f9898)