Issue #7428 has been updated by Thomas Haggett.
These issues have also been bugging me, they both seem to be manifestations of
the same ruby18 - ruby19 change. In ruby18, you could pass arguments to a block
with arity 0 and it would silently drop the argument. In ruby19 this raises the
above exception.
I've filed the collected resources issue in a separate ticket (and also the
quick hack I used to get them working again) at #10963.
For this issue, the opt-parse blocks are receiving unexpected arguments, so
I've just patched the file on my machines.
---
For these options in `lib/puppet/application/cert.rb`:
option("--clean", "-c") do
self.subcommand = "destroy"
end
option("--all", "-a") do
@all = true
end
...
option("--signed", "-s") do
@signed = true
end
I've hacked the three options to have a catch-all ignored argument, as such:
option("--all", "-a") do |*_|
...
option("--clean", "-c") do |*_|
...
option("--signed", "-s") do |*_|
...
and they all start working again.
Hope that helps.
----------------------------------------
Bug #7428: Puppet cert fails on 1.9.2 with wrong number of arguments
https://projects.puppetlabs.com/issues/7428
Author: Cody Herriges
Status: Accepted
Priority: Normal
Assignee:
Category: ruby19
Target version: 2.7.x
Affected Puppet version: 2.7.0rc1
Keywords: certificate cert 1.9
Branch:
ody@orihime:[~]% rvm use 1.9.2
-- INSERT --
Using /Users/ody/.rvm/gems/ruby-1.9.2-p180
ody@orihime:[~]% sudo envpuppet puppet cert --trace --list
-- INSERT --
/Users/ody/gits/puppet/lib/puppet/application/cert.rb:42:in `block (2
levels) in <class:Cert>'
/Users/ody/gits/puppet/lib/puppet/application.rb:358:in `block (2 levels)
in parse_options'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1277:in
`call'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1277:in
`block in parse_in_order'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1264:in
`catch'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1264:in
`parse_in_order'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1258:in
`order!'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1349:in
`permute!'
/Users/ody/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/optparse.rb:1370:in
`parse!'
/Users/ody/gits/puppet/lib/puppet/application.rb:365:in `parse_options'
/Users/ody/gits/puppet/lib/puppet/application/cert.rb:212:in `parse_options'
/Users/ody/gits/puppet/lib/puppet/application.rb:303:in `block (2 levels)
in run'
/Users/ody/gits/puppet/lib/puppet/application.rb:411:in `hook'
/Users/ody/gits/puppet/lib/puppet/application.rb:303:in `block in run'
/Users/ody/gits/puppet/lib/puppet/application.rb:402:in `exit_on_fail'
/Users/ody/gits/puppet/lib/puppet/application.rb:303:in `run'
/Users/ody/gits/puppet/lib/puppet/util/command_line.rb:61:in `execute'
/Users/ody/gits/puppet/bin/puppet:4:in `<main>'
Could not parse options: wrong number of arguments (1 for 0)
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.