Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-943

Puppet on Windows can fail to run depending on load order

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.4.0
    • Component/s: None
    • Labels:
    • Template:
    • Story Points:
      1
    • Sprint:
      Week 2013-12-04 to 2013-12-11

      Description

      The Puppet::Util::Windows::Security module doesn't require 'ffi' before using it. The gem is required in other places, though so this seems to be dependent on the load order.

      <pre>
      $ ssh Administrator@josh-ny1po54a0o.solar.lan cmd.exe /c puppet agent --test
      C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows/security.rb:635:in `<module:API>': uninitialized constant Puppet::Util::Windows::Security::API::FFI (NameError)
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows/security.rb:634:in `<module:Security>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows/security.rb:77:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows.rb:6:in `<module:Windows>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows.rb:1:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/monkey_patches.rb:190:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util.rb:16:in `<module:Util>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util.rb:15:in `<module:Puppet>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util.rb:14:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet.rb:8:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/command_line.rb:12:in `<top (required)>'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from C:/ruby193/bin/puppet:3:in `<main>'
      </pre>

      The fix is simple, add `require 'ffi'`

        Attachments

          Activity

            People

            Assignee:
            joshua.partlow Joshua Partlow
            Reporter:
            redmine.exporter redmine.exporter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support