HomeSoftware Heritage

Fix Could not set 'present' on ensure: wrong number of arguments (given 1…

Description

Fix Could not set 'present' on ensure: wrong number of arguments (given 1, expected 0)

Without this patch a mysterious exception is thrown when the checksum
does not match. This is a problem because it's unclear the problem is
related to the checksum.

This patch fixes the problem by returning the correct error when the
checksum doesn't match.

Wrapped exception:
wrong number of arguments (given 1, expected 0)
/opt/puppetlabs/puppet/cache/lib/puppet/provider/archive/ruby.rb:86:in `destroy'
/opt/puppetlabs/puppet/cache/lib/puppet/provider/archive/ruby.rb:197:in `transfer_download'
/opt/puppetlabs/puppet/cache/lib/puppet/provider/archive/ruby.rb:81:in `create'
/opt/puppetlabs/puppet/cache/lib/puppet/type/archive.rb:13:in `block (3 levels) in <top (required)>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:490:in `set'
...
Error:
/Stage[main]/Profile::Consul::Consultemplate/Archive[/usr/local/bin/consul-template]/ensure:
change from 'absent' to 'present' failed: Could not set 'present' on
ensure: wrong number of arguments (given 1, expected 0) (file:
/etc/puppetlabs/code/environments/jeff/site-modules/profile/manifests/consul/consultemplate.pp,
line: 6)

Details

Provenance
Jeff McCune <jeff@openinfrastructure.co>Authored on Apr 29 2021, 10:18 PM
olasdPushed on Dec 28 2021, 10:47 AM
Parents
R144:5a91fa44f770: [blacksmith] Bump version to 5.0.1-rc0
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff McCune <jeff@openinfrastructure.co> committed R144:f75caeb22da9: Fix Could not set 'present' on ensure: wrong number of arguments (given 1… (authored by Jeff McCune <jeff@openinfrastructure.co>).Apr 29 2021, 10:38 PM