Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resurfaced issue: Ubuntu:focal + latest docker-in-docker feature fails to prebuild due to Moby package validation issue #1167

Closed
sayhiben opened this issue Oct 30, 2024 · 2 comments

Comments

@sayhiben
Copy link
Contributor

sayhiben commented Oct 30, 2024

Our Codespaces prebuilds are suddenly failing today due to a package registry mismatch with a very similar issue to #837

devcontainer.json entry:

    "ghcr.io/devcontainers/features/docker-in-docker:2": {
      "version": "latest"
    }

Build log:

#28 0.687 ===========================================================================
#28 0.687 Feature       : Docker (Docker-in-Docker)
#28 0.687 Description   : Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.
#28 0.691 Id            : ghcr.io/devcontainers/features/docker-in-docker
#28 0.691 Version       : 2.12.0
#28 0.691 Documentation : ********/devcontainers/features/tree/main/src/docker-in-docker
#28 0.691 Options       :
#28 0.691     VERSION="latest"
#28 0.691     MOBY="********"#28 0.691     MOBYBUILDXVERSION="latest"
#28 0.691     DOCKERDASHCOMPOSEVERSION="latest"
#28 0.691     AZUREDNSAUTODETECTION="********"
#28 0.691     DOCKERDEFAULTADDRESSPOOL=""
#28 0.691     INSTALLDOCKERBUILDX="********"
#28 0.691     INSTALLDOCKERCOMPOSESWITCH="********"
#28 0.691     DISABLEIP6TABLES="false"
#28 0.691 ===========================================================================

[...]

#28 258.3 E: Failed to fetch https://packages.microsoft.com/repos/microsoft-ubuntu-focal-prod/pool/main/m/moby-cli/moby-cli_27.0.3-ubuntu20.04u1_amd64.deb  Hash Sum mismatch
#28 258.3    Hashes of expected file:
#28 258.3     - SHA256:31a1224489f23a686c3b1bc56caecd1b818645dd3dc377923f28f468ceadf325
#28 258.3     - Filesize:17200298 [weak]
#28 258.3    Hashes of received file:
#28 258.3     - SHA256:6595ea74048ae9add8e4b98dd2560332c05e1295a6d9e2aca44295c39b47ed1a
#28 258.3     - Filesize:17200298 [weak]

The entry in Microsoft's package registry states this, where there is a hash mismatch between what's downloaded and what the registry states

Package: moby-cli
Version: 27.0.3-ubuntu20.04u1
Architecture: amd64
Section: admin
Priority: optional
Installed-Size: 39035
Maintainer: Microsoft <[email protected]>
Description: Docker container platform (client package)
 Docker is a platform for developers and sysadmins to develop, ship, and run
 applications. Docker lets you quickly assemble applications from components and
 eliminates the friction that can come when shipping code. Docker lets you get
 your code tested and deployed into production as fast as possible.
 .
 This package provides the "docker" client binary (and supporting files).
Homepage: https://github.com/docker/cli
Conflicts: docker, docker-ce, docker-ce-cli, docker-ee, docker-ee-cli, docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
Depends: libc6 (>= 2.4)
Recommends: ca-certificates, git, moby-buildx, pigz, xz-utils
Replaces: docker, docker-ce, docker-ce-cli, docker-ee, docker-ee-cli, docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
SHA256: 31a1224489f23a686c3b1bc56caecd1b818645dd3dc377923f28f468ceadf325
Size: 17200298
Filename: pool/main/m/moby-cli/moby-cli_27.0.3-ubuntu20.04u1_amd64.deb

It seems like when we download the file directly from the package repo, we receive the correct hash, but there is for some reason a mismatch during prebuilds, which indicates that a mirror or some other redirection may be taking place

This is blocking work for our organization. Please let me know how I can help resolve.

@sayhiben
Copy link
Contributor Author

This appears to be resolved. If repo maintainers or someone maintainers are in contact with can express to the maintainer of that package registry how critical it is to prevent these issues, it would be appreciated. Thanks

@cbini
Copy link

cbini commented Nov 20, 2024

UPDATE: it succeed this on a subsequent try. not sure if this is the fix, but I ran a Full rebuild instead of a regular one.

Appears to be a problem again

#15 8.368 Get:2 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm/main amd64 moby-cli amd64 27.0.3-debian12u1 [17.2 MB]
#15 252.3 Err:2 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm/main amd64 moby-cli amd64 27.0.3-debian12u1
#15 252.3   Hash Sum mismatch
#15 252.3   Hashes of expected file:
#15 252.3    - SHA256:7354be8bc52a09811f2a931bdadf6153883aaaf8159c611f8717594fea1c6ec0
#15 252.3    - Filesize:17190076 [weak]
#15 252.3   Hashes of received file:
#15 252.3    - SHA256:1c42878794aa213f5a91e9cbc7b9df5b128a18921eece5e9bf30f71dd12f0c35
#15 252.3    - Filesize:17190076 [weak]
#15 252.3   Last modification reported: Mon, 22 Jul 2024 18:36:38 +0000

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

No branches or pull requests

2 participants