Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-973

unable to load code from puppet modules outside of `lib/puppet`

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: SERVER 1.1.1, SERVER 2.1.1
    • Fix Version/s: None
    • Component/s: Puppet Server
    • Labels:
      None
    • Environment:

      EL6

      Description

      puppetserver appears to be unable to load (require) ruby code that resides in paths other than `lib/puppet` inside of a module. This breaks any module that follows the recommended convention of putting module specific logic into the PuppetX::<vendor> name space (./lib/puppet_x/<vendor>/...).

      There is a known work around: https://github.com/nanliu/puppet-archive/blob/766062a3465053ca8a326ea0b3c31648a49474a4/lib/puppet/provider/archive/default.rb#L1-L10 but it is both hackish and needs to be applied to all files that require code from outside ./lib/puppet/. I'm facing having to insert this boiler plate into ~20 files for my module to be compatible with puppetserver, which is undesirable. It's also undesirable to require users to have to change their puppetserver configuration to support this idiom.

      2015-10-12 13:16:39,202 INFO  [puppet-server] Puppet Caching node for agent.lsst.org
      2015-10-12 13:16:39,283 ERROR [puppet-server] Puppet Could not autoload puppet/type/jenkins_user: no such file to load -- puppet_x/jenkins/type/cli
      org/jruby/RubyKernel.java:1072:in `require'
      /usr/share/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in `require'
      /etc/puppet/modules/jenkins/lib/puppet/type/jenkins_user.rb:1:in `(root)'
      org/jruby/RubyKernel.java:1091:in `load'
      /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:1:in `(root)'
      /usr/lib/ruby/site_ruby/1.8/puppet/util/autoload.rb:62:in `load_file'
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jhoblitt Joshua Hoblitt
                  QA Contact:
                  Erik Dasher
                • Votes:
                  4 Vote for this issue
                  Watchers:
                  23 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Zendesk Support