puppetlabs / r10k

Smarter Puppet deployment
Other
803 stars 352 forks source link

r10k fails to check config #935

Closed jordiprats closed 5 years ago

jordiprats commented 5 years ago

Hi, r10k is failing to check syntax:

[root@ip-172-31-16-114 yum]# /opt/puppetlabs/puppet/bin/r10k puppetfile check

r10k: Runtime error: #<ArgumentError: R10K::Action::Puppetfile::Check cannot handle option 'help'>
[root@ip-172-31-16-114 yum]# 

Puppetfile:

[root@ip-172-31-16-114 yum]# cat Puppetfile 
moduledir '/tmp/yum/modules'
mod 'yum',
  :git => 'https://github.com/jordiprats/eyp-yum'

Error doesn't look meaningful to me. Any idea what this means?

Backtrace:

[root@ip-172-31-16-114 yum]# /opt/puppetlabs/puppet/bin/r10k --trace puppetfile check

r10k: Runtime error: #<ArgumentError: R10K::Action::Puppetfile::Check cannot handle option 'help'>
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/util/setopts.rb:49:in `block in setopts'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/util/setopts.rb:35:in `each_pair'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/util/setopts.rb:35:in `setopts'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/action/base.rb:18:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/action/runner.rb:23:in `new'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/action/runner.rb:23:in `instance'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/action/runner.rb:33:in `call'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/lib/r10k/action/cri_runner.rb:67:in `call'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/cri-2.15.7/lib/cri/command_dsl.rb:303:in `block in runner'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/cri-2.15.7/lib/cri/command.rb:369:in `run_this'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/cri-2.15.7/lib/cri/command.rb:296:in `run'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/cri-2.15.7/lib/cri/command.rb:314:in `run'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/cri-2.15.7/lib/cri/command.rb:314:in `run'
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/r10k-3.2.0/bin/r10k:7:in `<top (required)>'
/opt/puppetlabs/puppet/bin/r10k:23:in `load'
/opt/puppetlabs/puppet/bin/r10k:23:in `<main>'
[root@ip-172-31-16-114 yum]# 

I'm runing this on:

[root@ip-172-31-16-114 yum]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

Ruby:

[root@ip-172-31-16-114 yum]# /opt/puppetlabs/puppet/bin/ruby --version
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux] 

puppet:

[root@ip-172-31-16-114 yum]# /opt/puppetlabs/puppet/bin/puppet --version
5.5.14 

thanks,

mattk42 commented 5 years ago

@jordiprats I believe this is related to #930. Try downgrading your cri gem to 2.15.6, that should get you past it for the moment.

jordiprats commented 5 years ago

Thanks @mattk42 downgrading cri to .6 have fixed it:

[root@ip-172-31-16-114 yum]# /opt/puppetlabs/puppet/bin/r10k puppetfile check
Syntax OK
[root@ip-172-31-16-114 yum]# 

For future reference:

/opt/puppetlabs/puppet/bin/gem  uninstall cri --version 2.15.7
/opt/puppetlabs/puppet/bin/gem  install cri --version 2.15.6

I'm closing this issue since it is related to #930

thanks!