Issue #23366 has been updated by Josh Cooper.

Status changed from Accepted to In Topic Branch Pending Review
Branch set to https://github.com/puppetlabs/puppet/pull/2128

----------------------------------------
Bug #23366: Puppet on Windows can fail to run depending on load order 
https://projects.puppetlabs.com/issues/23366#change-101040

* Author: Josh Cooper
* Status: In Topic Branch Pending Review
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 3.4.0
* Affected Puppet version: 3.4.0-rc1
* Keywords: windows
* Branch: https://github.com/puppetlabs/puppet/pull/2128
----------------------------------------
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 [email protected] cmd.exe /c puppet agent  --test
C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows/security.rb:635:in 
`&lt;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 
`&lt;module:Security>'
        from 
C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows/security.rb:77:in 
`&lt;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 
`&lt;module:Windows>'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util/windows.rb:1:in 
`&lt;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 
`&lt;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 
`&lt;module:Util>'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util.rb:15:in 
`&lt;module:Puppet>'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/puppet/util.rb:14:in `&lt;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 `&lt;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 `&lt;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 `&lt;main>'
</pre>

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


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to