Skip to content

[v0.10 backport] frontend: fix testMultiStageImplicitFrom to account for busybox changes#3437

Merged
crazy-max merged 1 commit intomoby:v0.10from
thaJeztah:0.10_backport_fix_tests2
Dec 27, 2022
Merged

[v0.10 backport] frontend: fix testMultiStageImplicitFrom to account for busybox changes#3437
crazy-max merged 1 commit intomoby:v0.10from
thaJeztah:0.10_backport_fix_tests2

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Dec 27, 2022

backport of

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

(cherry picked from commit 34f9898)

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>
@thaJeztah
Copy link
Copy Markdown
Member Author

Could it be that COPY --link doesn't like it if the directory contains a symlink to something outside of the directory?

2022-12-27T17:34:44.8771369Z time="2022-12-27T17:28:31Z" level=debug msg="load cache for [integration-tests-base 11/11] LINK COPY --link --from=binaries / /usr/bin/ err: maximum timeout reached"
2022-12-27T17:34:44.8772179Z time="2022-12-27T17:28:31Z" level=debug msg="load cache for [binaries-linux 2/2] LINK COPY --link --from=buildkitd /usr/bin/buildkitd / with sha256:57d7afdfd4b9a22f8c3ac0f75d32290fe56c316a512d56ef7668aad0d7f4e148"

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