Project

General

Profile

Bug #26180

puppet-certs does not work with 'puppet generate types'

Added by Trey Dockendorf 9 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:

Description

Content copied from https://github.com/theforeman/puppet-certs/issues/247

The use of `certs_common` in `types` directory breaks type generation because it's not actually a valid type.

# /opt/puppetlabs/bin/puppet generate types --environment production --trace --debug
<SNIP>
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/ca.rb' because it is up-to-date.
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/cert.rb' because it is up-to-date.
Debug: Skipping '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/certs_bootstrap_rpm.rb' because it is up-to-date.
Debug: Loading custom type 'certs_common' in '/etc/puppetlabs/code/environments/production/modules/certs/lib/puppet/type/certs_common.rb'.
Error: undefined method `[]' for nil:NilClass
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:198:in `block in generate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:174:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/generate/type.rb:174:in `generate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/face/generate.rb:60:in `block (3 levels) in <top (required)>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/interface/action.rb+eval[wrapper]:264:in `types'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/face_base.rb:247:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:383:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:667:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:135:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Error: Try 'puppet help generate types' for usage

Associated revisions

Revision 2d14f54b (diff)
Added by Trey Dockendorf 9 months ago

Fixes #26180 - Fix puppet generate types by moving common

Move type common module to PuppetX namespace to avoid breaking `puppet generate types`.

History

#1 Updated by Trey Dockendorf 9 months ago

I am using Satellite 6.4 and use the certs module outside the installer for my puppet masters because I don't let the installer manage puppet to reduce duplication of data.

#2 Updated by The Foreman Bot 9 months ago

  • Assignee set to Trey Dockendorf
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-certs/pull/248 added

#3 Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/theforeman/puppet-certs/pull/249 added

#4 Updated by Ewoud Kohl van Wijngaarden 9 months ago

  • Target version set to 1.22.0
  • Category set to Foreman modules
  • Fixed in Releases 1.20.3, 1.21.1, 1.22.0 added

#5 Updated by Ewoud Kohl van Wijngaarden 9 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Ewoud Kohl van Wijngaarden 5 months ago

  • Fixed in Releases deleted (1.20.3)

This was released as puppet-certs 4.4.3 but Katello 3.10 includes 4.4.2. There likely won't be a Katello 3.10.2 to include this.

Also available in: Atom PDF