Skip to content

Conversation

@arm64b
Copy link
Contributor

@arm64b arm64b commented Jan 4, 2018

Upgrade the frozen images to multi-arch, and fix all the bugs triggered by the upgrade accordingly.

fixes #35927

Signed-off-by: Dennis Chen [email protected]

- What I did

  1. Upgrade the frozen images to multi-arch 2. Fix all the compatible issue of this upgrade

- How I did it
Upgrade all the legacy frozen docker images to the latest multi-arch ones, then handle the compatible issue for the newer version.

- How to verify it
We can verify it directly with make test-integration.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

summit1

Copy link
Contributor

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

LGTM 👍 but maybe we can use Busybox v1.27 in all our testing.

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Instead of trying to support both versions can we just upgrade the frozen image to the latest version?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this helper is necessary. Just call Docker(Args(...)) directly.

DockerCmd() only exists for backwards compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can upgrade the frozen image to the latest version and only support the latest for this test case 🉑 things will be easy as it should to be...

@thaJeztah
Copy link
Member

Silly question; is busybox not using SemVer? And if it does, this would be a breaking change; should this be reported upstream in the busybox issue tracker?

@tophj-ibm
Copy link
Contributor

@thaJeztah busybox appears to use SemVar. They have their own version of ls, which they changed a while ago in busybox 1.27.0, when they replaced -e with --full-time https://git.busybox.net/busybox/commit/?id=194b2ebd2a0cfc1d27744dea10ef706975c61317 so I don't think we have to submit an issue.

The arch-specific frozen busybox images use v1.26.2 with the old functionality, so all the dockerfiles should all be updated to use the manifest list which points to v1.27.2 too.

@arm64b
Copy link
Contributor Author

arm64b commented Jan 5, 2018

Thanks for the review! So according to the comments, I am happy to make below changes:

  1. Upgrade the frozen images to the latest (we just have a multi-arch images download PR Download support of images with multi-arch manifest #35772 merged to do that)
  2. Support the latest version of BusyBox (v1.27)

Will push the changes soon. Any comments/suggestions are appreciated, as always 👍

@arm64b arm64b force-pushed the busybox-ls-compatible branch from a6c45b3 to 08cd715 Compare January 5, 2018 07:39
@arm64b arm64b requested a review from tianon as a code owner January 5, 2018 07:39
@arm64b
Copy link
Contributor Author

arm64b commented Jan 5, 2018

Hello every maintainers, PTAL? 😵

@dnephin
Copy link
Member

dnephin commented Jan 5, 2018

Thanks! The change looks good, but there are a few more test failures to fix.

For TestRunSlowStdoutConsumer I think there are two problems:

  1. stderr is never checked, so the failure message is not helpful. It should probably check that stderr is empty somewhere.
  2. (to fix the actual failure) change catv to cat -v

For TestListImagesWithDigests it looks like busybox now has a digest, so the last assertion is failing (only for janky, I'm not sure why it doesn't also fail on experimental).

I'm not sure about the rest of the failures, so might be flakes. When you push those fixes we'll see if the same tests fail. Adding the links to the first CI runs here:

Dockerfile.armhf Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This is the one case where download-frozen-image-v2.sh won't be smart enough as-is to use the correct image (just like Docker ATM isn't smart enough as-is). See #34875 for more details (and download-frozen-image-v2.sh now uses a very similar algorithm to Docker's own for choosing).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right! Things will be a little bit complicated when we talking about arm arch, since it acrosses wider ecosystem from embedded, mobile/IoT to the enterprise. For the topic itself, clearly we need a variant to location the exact arm image such as armhf and armel. Current problem is with GOARCH we only tell arm64 or arm, we've realized this so that's why we have a PR containerd/containerd#1575 merged into containerd to handle this, that PR uses /proc/cpuinfo to get v5 v6 v7 v8 info of arm. So IMO, probably we need to add the variant support in download-frozen-image-v2.sh in terms of arm 32bit case. currently I prefer to let it to be still existing one , and enhance that after all the multi-arch futures for Arm arch are ready. For me, I don't care about the 32-bit at all, my github account is arm64b meaning 'it's arm, but only 64b(it)` 🎃. But if you have any suggestions here, I am happy to take account of it.

@arm64b
Copy link
Contributor Author

arm64b commented Jan 8, 2018

@dnephin For the 2 problems of TestRunSlowStdoutConsumer case, I guess the first one is not the case specific, actually I have to confess that I don't quite understand that well. So I use cat -v instead of catv to trigger the new around CI test (I found I have to systemctl restart docker in my local machine to pass more test cases, but I have no control for the CI system 😭 ).

For the TestListImagesWithDigests, It's very weird to get below info since we have no such digest for the change, I guess maybe there're some stale images in the system before:

08:40:14 imageReference1 = 127.0.0.1:5000/dockercli/busybox-by-dgst@sha256:9d0aa3088408437e0eb553a2e67e128e17001588e4fc09eb17b3bf6880d62c46
08:40:14 imageReference2 = 127.0.0.1:5000/dockercli/busybox-by-dgst@sha256:64a5c42230002a3dd98ecc52e149661c4718540f2a2b5539c10b6dcb84267911

@arm64b
Copy link
Contributor Author

arm64b commented Jan 8, 2018

Oops! Except the z node (being scheduled so long time?), the CI test still failes on Janky and experimental. Just go through the details, looks like there're 2 categories errors:

  1. TestListImagesWithDigests
  2. Errors seems related with ping and top command in busybox(but I checked the 2 commands for the 2 busybox versions, they are the same, so weird).
    (happened on x86 ony?)

But all those are above my head to move further to fix in short time, so I need you guys' great help to make the future better 🎉

@thaJeztah
Copy link
Member

Except the z node (being scheduled so long time?)

I think there's an issue currently with network access to the z nodes @tophj-ibm do you know what the status is on that one?

@tophj-ibm
Copy link
Contributor

@thaJeztah not much of an update, but the Z community cloud where these vms are being hosted had an outage on friday and is currently under maintenance. We have someone in that datacenter working with docker to get these machines back up

@arm64b arm64b force-pushed the busybox-ls-compatible branch from 82c56d0 to f9c1a25 Compare January 9, 2018 02:55
@arm64b arm64b changed the title Fix busybox ls command compatible issue Upgrade the frozen images to multi-arch ones Jan 9, 2018
Upgrade the frozen images to the multi-arch ones.

Since issue moby#35963 is not fixed yet on linux/amd64, so we keep the busybox
image on amd64 untouched.

Signed-off-by: Dennis Chen <[email protected]>
We don't need the test image namespace anymore since we've already
upgrade those images to the latest multi-arch ones.

Signed-off-by: Dennis Chen <[email protected]>
@arm64b arm64b force-pushed the busybox-ls-compatible branch from d383ca8 to 5f254ce Compare January 11, 2018 05:25
BusyBox v1.26.2 (2017-03-09 00:04:38 UTC) supports `-le` option
to get the full date and time information, while BusyBox v1.27.2
(2017-11-01 23:22:25 UTC, which is used by the official multi-arch
image, uses `--full-time` instead of `-e` to get the same data. As
a result, we will get below error for the `DockerSuite.TestBuildLastModified`
test case in case of multi-arch image used:

> docker_cli_build_test.go:446:
>     out2 = cli.DockerCmd(c, "run", name, "ls", "-le", "/file").Combined()
>   o/src/github.com/docker/docker/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go:61:
>     t.Fatalf("at %s:%d - %s\n", filepath.Base(file), line, err.Error())
> ... Error: at cli.go:33 -
> Command:  /usr/local/bin/docker run testbuildlastmodified ls -le /file
> ExitCode: 1
> Error:    exit status 1
> Stdout:
> Stderr:   ls: invalid option -- e
> BusyBox v1.27.2 (2017-11-01 23:22:25 UTC) multi-call binary.

This PR tries to fix the above compatible issue for busybox image.

Signed-off-by: Dennis Chen <[email protected]>
Use `cat -v` command instead of `catv` for the latest version of
busybox(V1.28.0) with multi-arch

Signed-off-by: Dennis Chen <[email protected]>
@arm64b
Copy link
Contributor Author

arm64b commented Jan 12, 2018

Hi @dnephin , PTAL? Thanks @thaJeztah for the 'rebuild' over and over 🤝

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 947eb28 into moby:master Jan 15, 2018
Pennyzct added a commit to Pennyzct/moby that referenced this pull request Feb 9, 2018
Since for now download-frozen-image-v2.sh won't be smart
enough to use the adequate image in arm platform, hence we add
variant support to fix it. Relevant request has been raised in
github (moby#35929 and
moby#34875).

Signed-off-by: Penny Zheng <[email protected]>
@arm64b arm64b deleted the busybox-ls-compatible branch February 13, 2018 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatible issue of command option for BusyBox versions

7 participants