Closed Gregory-N-able closed 4 years ago
Hey there @GregorySWI,
I think you should not set iso_checksum_type
or set it to "iso_checksum_type": "file",
if your cheksum is in a file; the file getter will determine the type for you.
It's all written here.
Edit: Also I see that the error is Couldn't extract checksum from checksum file
do you have that checksum file for us to check ? It needs to be in a special format for packer to understand it.
Is this a new change? This has been working with this config for over a year. Here is the checksum file:
I do see the "file" option, but if you notice, we are using the format of the last example in the doc.
I will try changing it to type "file" once the current job completes and update this bug.
I am also experimenting the same problem with packer 1.4.5 and regular ubuntu checksum file
Any update on this issue?
Hello @GregorySWI; was the issue fixed for you ?
@dcretin Do you have a simplified buildfile for me to try ? ( I simply want to make sure it's the same issue )
Thank you for looking at this @azr !
Here you are: test-ubuntu-file-hash.zip
Hello there; can any of you tell me if the binaries found here fixes this issue ? Thanks !
Sorry it took so much time to circle back to this issue; I was deeply focusing onto something else 🙂
Hello there; can any of you tell me if the binaries found here fixes this issue ? Thanks !
Sorry it took so much time to circle back to this issue; I was deeply focusing onto something else 🙂
I tried changing from "iso_checksum_type": "sha512" to "iso_checksum_type": "file" and I get the same cannot read checksum from file error.
Testing the above linked binary for Windows, is the same as well:
`[11/22/19 10:12:11] Calling Packer using Command Line: [11/22/19 10:12:11] E:\bin\packer.exe build -force -timestamp-ui -on-error="abort" -var vm_name="My-Custom-ISO-100.0.0.952-25" -var iso_url="C:\Cloud\My-Custom-ISO-100.0.0.952.iso" -var iso_checksum_url="C:\Cloud\My-Custom-ISO-100.0.0.952.sha5" -var disk_size="25600" -var temp_path="E:\Temp\" "E:\Cloud\Azure\azure.json" hyperv-iso output will be in this color.
1 error(s) occurred:
And the contents of My-Custom-ISO-100.0.0.952.sha5:
56074d7797ff9f94b22cf5a51333d481cbade98e1221fabac9180718d1189a16a4f8862a5ca3e72e8565d01de7da7b6aff601892ff68279e373c23bdf7ebdcbd My-Custom-ISO-100.0.0.952.iso
Just tested the new binary file with the "iso_checksum_type": "sha512" value set as well and I recieved the same error as above.
this is go getter error, i have templates that worked for more then two years and not it broken by new packer. i'm use checksum url to specify remote checksum file and set checksum type sha1, but with packer 1.4.5 it always failed. and worked fine with packer 1.4.2
checksum error happend for this file https://cdimage.debian.org/mirror/cdimage/archive/9.4.0/amd64/iso-cd/SHA1SUMS and not happened for this https://mirror.yandex.ru/archlinux/iso/latest/sha1sums.txt
as you see this is both sha1 checksums
please fix the issue and tag release, because 1.4.5 is really broken
and if i set iso_checksum_type to file it works, but why i need to change my templates after new release?
if cksum == nil || err != nil {
errs = append(errs, fmt.Errorf("Couldn't extract checksum from checksum file"))
} else {
why the error is dropped? if cksum is nil return one error, if err != nil append it to errs slice
Hello there, sorry I made myself pretty busy with HCL2 and paused in here. I'm taking a look at this now and one way to fix this would be to change:
"iso_checksum_type": "file",
"iso_checksum": "{{user `iso_server`}}/SHA256SUMS",
to
"iso_checksum": "file:{{user `iso_server`}}/SHA256SUMS",
This bug was introduced here: https://github.com/hashicorp/packer/pull/7804
But have also I've bundled #7627 with a fix for this and this should be fixed soon !
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Overview of the Issue
Upgraded Packer.io for Windows (packer.exe) from 1.4.2 to 1.4.5 and kicked off a new, scripted, Hyper-V ISO build. After preparing the build sources, the packer.exe call failed immediately with the error:
Reverting back to Packer.io version 1.4.2, the build is successful.
Reproduction Steps
From the build system log (we use Packer.io to build an upload-able Azure custom image):
Packer version
Simplified Packer Buildfile
Gist
Operating system and Environment details
Bare Metal Dell PowerEdge R710
Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
48 GB RAM
C: 1TB (1002GB Free)
E: 6.27 TB (6.16TB Free)
Called by a PowerShell script, from our Jenkins build system
Log Fragments and crash.log files
I will have to run Packer 1.4.5 in debug once my image build job completes (48 hours) in order to get the requested logs (I reverted to 1.4.2 in order to complete the build job I was trying to run).