-
Notifications
You must be signed in to change notification settings - Fork 144
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
Adapt to the not-deprecated checksum syntax. #156
Adapt to the not-deprecated checksum syntax. #156
Conversation
If you run |
Since none of those issues have been introduced by this Pull Request, I fixed the rest of them in a different PR. EDIT: I just got what you meant. Starting with Packer 1.6, this is a hard-fail, not just a recommendation, which is why I chose to do the other (not-fatal) warnings/notices in a seperate PR.
Hyper-V definitely isn't broken here, since I originally noticed and fixed this on Windows (where I freshly downloaded Packer 1.6.0, which now hard-fails when it sees Also, could you make sure that the setup on your side (and on the build servers) understands this syntax? I haven't yet tracked down when this was introduced (the "new syntax", not the deprecation of the old one). I'm pretty sure that it does, but the documentation for that has been updated only recently. As soon as everything is sorted out, I'll catch up with recent checksum changes. |
I now successfully tested the following configurations (together with #157 ):
Parallels builds I could not test because my test version ran out, and packer apparently only works with the Pro version (starting with Parallels 11). Windows VirtualBox builds I could not test either, because something in my Windows environment breaks virtualization, instantly crashing VirtualBox when spinning up a VM (also happens on "normal" VMs, so I doubt that this is caused by Packer). |
Yeah, all of the build machines are stuck using I recently did an experiment using |
The changes here seem to have been the only thing that was required to make packer 1.6.0+ happy again (i.e. this is the only actual incompatibility that I could spot). The other PR contains the remaining stuff to make the validate script happy, and I don't remember any leftover warnings after that (at least at the time when I wrote the patches, it might have changed by now). But yeah, since that's actually infra-related and probably not that many people self-build and use packer 1.6+, I guess that this isn't critical at the moment. |
Yeah, it's a tricky update too, because by the time I get chance to review, all the files have been changed. Below is how far I got trying to automate the update. I forgot to mention above, but because everything gets reordered, it's impossible to review the changes because a diff is useless. # packer fix developer-hyperv.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > developer-hyperv.json.new
# packer fix developer-libvirt.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > developer-libvirt.json.new
# packer fix developer-ova.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > developer-ova.json.new
# packer fix developer-virtualbox.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > developer-virtualbox.json.new
# packer fix developer-vmware.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > developer-vmware.json.new
# packer fix generic-docker.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-docker.json.new
# packer fix generic-hyperv.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-hyperv.json.new
# packer fix generic-libvirt.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-libvirt.json.new
# packer fix generic-libvirt-x32.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-libvirt-x32.json.new
# packer fix generic-parallels.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-parallels.json.new
# packer fix generic-virtualbox.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-virtualbox.json.new
# packer fix generic-vmware.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > generic-vmware.json.new
# packer fix lineage-hyperv.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > lineage-hyperv.json.new
# packer fix lineage-libvirt.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > lineage-libvirt.json.new
# packer fix lineage-virtualbox.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > lineage-virtualbox.json.new
# packer fix lineage-vmware.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > lineage-vmware.json.new
# packer fix magma-docker.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > magma-docker.json.new
# packer fix magma-hyperv.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > magma-hyperv.json.new
# packer fix magma-libvirt.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > magma-libvirt.json.new
# packer fix magma-virtualbox.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > magma-virtualbox.json.new
# packer fix magma-vmware.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > magma-vmware.json.new
# packer fix packer-cache.json | jq "{ variables: .variables, provisioners: [ .provisioners | .[] | { only: .only, scripts: .scripts, type: .type, pause_before: .pause_before, \"start_retry_timeout\": .\"start_retry_timeout\", \"expect_disconnect\": .\"expect_disconnect\", \"execute_command\": .\"execute_command\" } ], builders: .builders, \"post-processors\": .\"post-processors\" }" | grep -v ': null$' | grep -v ': null,$' > packer-cache.json.new
|
I don't suppose you could convert the template changes into a series of a |
If I might ask, is there actually such a big need for having And since your second response came in just as I was writing this: Sure, I'll see if I can replicate the sed commands that I used. I'll post them on their relevant PR respectively. |
The second commit of this PR (the one handling JSON) is made using the following commands:
The other PR will have to wait until I added back all my RAM (so probably tomorrow), 32GB doesn't seem to be enough to run a full validation. |
From #156 (comment):
From our README.md:
@ladar Shall I install |
The corresponding pull request (hashicorp/packer#7330) has long been merged and the branch was deleted, so I don't think the script will still work. That said, GitHub indicates that this feature branch is included in releases since v1.5.0, so you should be fine if you are using that version or anything newer. |
@timschumi I incorporated the changes. It wasn't as painful as I remembered... in that there were only a small number of duplicate keys, and and the sed commands made it easy to update the ISO keys. I thought there were other more involved changes with how cpus/mem/disks, etc were defined, as Everything validates on my workstation, if I increase the max file limit... aka I'll probably let the |
@timschumi I didn't notice those other changes. I thought this only dealt with the JSON schema updates which caused newer To cherry pick a question from above, the Rather, you can setup the providers by using the |
I snagged that single commit as a patch: https://github.com/lavabit/robox/commit/700aebfce8cebe1375d15c35ed7879a3ec4194be.diff And merged it. |
In case I wasn't clear, all of the build robots use a vanilla 1.4.5 release. But I'm trying to update the templates, so I can get back to keeping pace with |
So I just realized I missed the sed commands for updating disk size, and ssh timeout. I ran them, and pushed the result, but strangely enough the old the syntax wasn't triggering a validation error. It has me worried I might of missed something important. @timschumi let me know if I missed anything... |
I'll take a look. What version have you been validating locally with? iirc at least version 1.6.0+ was terribly mad about both the disk size and SSH timeout. |
Huh, I just tested validation again using the current tip of this PR, so there should be quite a few warnings (precisely the ones fixed in #157 ). But it doesn't find any (apart from the actual duplicated keys). I'm sure that those warnings were actually there, and I'm pretty sure that I was able to get those warnings on two different PCs, but I can't test on my original systems since I recently reinstalled my OS. Weird. |
Starting with packer 1.6, the
iso_checksum_type
andiso_checksum_url
fields have been deprecated. Instead, the checksum type is now written before the actual checksum iniso_checksum
.