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

packer continues to build even if iso_checksum_url download fails #155

Open
avx-rvandegrift opened this issue Aug 28, 2023 · 0 comments
Open
Labels

Comments

@avx-rvandegrift
Copy link

Overview of the Issue

I'm using a remote checksum file. packer had a network error while downloading the file, but it still continued. All of the expected images were built, but packer exited with an error code (so github actions saw a failure).

Either:

  1. packer couldn't verify the checksum but continued anyhow (scary, since I can't be sure what it was working with)
  2. packer retried download and succeeded, but still exited with a failure (merely annoying, since now I have to re-run)

Reproduction Steps

Hard to reproduce - depends on checksum file download failure.

Plugin and Packer version

I'm using packer 1.8.7 in Github actions by way of hashicorp/setup-packer@v2.0.0 with the qemu builder.

Simplified Packer Buildfile

The relevant part of my sources is:

source "qemu" "img-boot" {
  iso_url      = "https://cloud-images.ubuntu.com/releases/22.04/release-20230815/ubuntu-22.04-server-cloudimg-amd64.img"
  iso_checksum = "file:https://cloud-images.ubuntu.com/releases/22.04/release-20230815/SHA256SUMS"
}

Operating system and Environment details

Running in github actions on ubuntu-latest-8-cores with nested kvm enabled.

Log Fragments and crash.log files

Relevant bit of logs:

2023-08-28T22:15:57.7721333Z packer init .
2023-08-28T22:15:58.6280791Z packer build -force -on-error=cleanup -parallel-builds=8 .
2023-08-28T22:18:02.3983059Z Error: 1 error(s) occurred:
2023-08-28T22:18:02.3983728Z
2023-08-28T22:18:02.4012220Z * Error downloading checksum file: Get "https://cloud-images.ubuntu.com/releases/22.04/release-20230815/SHA256SUMS": read tcp 10.0.0.41:35328->185.12
5.190.37:443: read: connection reset by peer in "file:https://cloud-images.ubuntu.com/releases/22.04/release-20230815/SHA256SUMS"
2023-08-28T22:18:02.4013305Z
2023-08-28T22:18:02.4013671Z   on sources.pkr.hcl line 3:
2023-08-28T22:18:02.4014241Z   (source code not available)
2023-08-28T22:18:02.4014650Z
2023-08-28T22:18:02.4014681Z
2023-08-28T22:18:02.4015103Z A.qemu.img-boot: output will be in this color.
... (more builds)
2023-08-28T22:18:02.4018647Z
2023-08-28T22:18:02.4028391Z ==> A.qemu.img-boot: Retrieving ISO
2023-08-28T22:18:02.4030680Z ==> A.qemu.img-boot: Trying https://cloud-images.ubuntu.com/releases/22.04/release-20230815/ubuntu-22.04-server-cloudimg-amd64.img
2023-08-28T22:18:49.8774666Z ==> A.qemu.img-boot: Trying https://cloud-images.ubuntu.com/releases/22.04/release-20230815/ubuntu-22.04-server-cloudimg-amd64.img?checksum=sha256%3A870bd58b5c1e9da3de5e44987de88cb6a877f15eaccc977a0898f015407ba402
2023-08-28T22:18:52.1919550Z ==> A.qemu.img-boot: https://cloud-images.ubuntu.com/releases/22.04/release-20230815/ubuntu-22.04-server-cloudimg-amd64.img?checksum=sha
256%3A870bd58b5c1e9da3de5e44987de88cb6a877f15eaccc977a0898f015407ba402 => /home/runner/.cache/packer/33aa0e70378232c3b3a9a5dd7e96ed4bc6c5b82c.iso
... (lots of build output snipped)
2023-08-28T22:43:20.7996419Z ==> A.qemu.img-boot: Running post-processor:  (type manifest)
2023-08-28T22:43:20.8042924Z Build 'A.qemu.img-boot' finished after 25 minutes 18 seconds.
2023-08-28T22:47:01.3340662Z
2023-08-28T22:47:01.3398578Z ==> Wait completed after 28 minutes 58 seconds
2023-08-28T22:47:01.3398911Z
2023-08-28T22:47:01.3399221Z ==> Builds finished. The artifacts of successful builds are:
... (list of artifacts snipped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant