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

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

Merged
merged 1 commit into from
May 1, 2021

Conversation

jeffmccune
Copy link
Contributor

Pull Request (PR) description

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.

This Pull Request (PR) fixes the following issues

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)

…en 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)
```
Copy link
Member

@alexjfisher alexjfisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexjfisher alexjfisher merged commit f8f32f7 into voxpupuli:master May 1, 2021
@bastelfreak bastelfreak added the bug Something isn't working label May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants