You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to converge one of my node I get an error about an invalid checksum for a file. The thing is, I'm not using nexus nor am I providing a checksum. The file is still in the s3 bucket and didn't change.
Part of the recipe handling that :
artifact_file "/usr/local/inversoft/config/#{node['cleanspeak_gs']['license_id']}.license" do
location "s3://s3.amazonaws.com/#{node['cleanspeak_gs']['s3_bucket_license_file']}/#{node['cleanspeak_gs']['license_id']}.license"
action :create
end
And the error in the chef-client run :
================================================================================
Error executing action `create` on resource 'artifact_file[/usr/local/inversoft/config/cl.license]'
================================================================================
Chef::Artifact::ArtifactChecksumError
-------------------------------------
[artifact] Downloaded file checksum does not match the provided checksum. Your download may be corrupted or your checksum may not be correct.
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/artifact/providers/file.rb:80:in `rescue in block in class_from_file'
/var/chef/cache/cookbooks/artifact/providers/file.rb:53:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/cleanspeak_gs/recipes/default.rb
33: artifact_file"/usr/local/inversoft/config/#{node['cleanspeak_gs']['license_id']}.license" do
34: location "s3://s3.amazonaws.com/#{node['cleanspeak_gs']['s3_bucket_license_file']}/#{node['cleanspeak_gs']['license_id']}.license"
35: action :create
36: end
37:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/cleanspeak_gs/recipes/default.rb:33:in `from_file'
artifact_file("/usr/local/inversoft/config/cl.license") do
action [:create]
retries 0
retry_delay 2
cookbook_name "cleanspeak_gs"
recipe_name "default"
location "s3://s3.amazonaws.com/s3-bucket/cl.license"
download_retries 1
end
The text was updated successfully, but these errors were encountered:
Hello KAllan357, there was some files theres with what I expect would be checksum. There was one for the licence file. Deleting the content of this dir fixed this problem.
But, this file, in the recipe never included any checksum checking.
@evangael the original intent behind some of the code in the artifact_file provider was meant to be as close-as-possible to Chef's implementation in remote_file.
Basically, the resource should be idempotent enough that if won't redownload the file that's already cached in Chef's file_cache_path - this is implemented by the checksumming mechanism at fault in this issue.
This definitely sounds like a bug. Unfortunately, I don't think we will be able to effectively plan on getting a fix for this, I'd be more than happy to look at / accept a pull request.
chef-client : 11.4.4
Artifact cookbook : 1.11.2
When I try to converge one of my node I get an error about an invalid checksum for a file. The thing is, I'm not using nexus nor am I providing a checksum. The file is still in the s3 bucket and didn't change.
Part of the recipe handling that :
And the error in the chef-client run :
The text was updated successfully, but these errors were encountered: