Issue #15990 has been updated by Gary Larizza.

I tried to enter what you suggested (actually, it's just a one-line addition) 
to lib/facter/util/cfpropertylist/lib/rbCFPropertyList.rb at line 110.  I got 
the following when I tried to run `puppet resource user -d --trace`:

<pre>

Error: Could not initialize: uninitialized constant LibXML::XML::Parser::Options
/Users/puppet/src/facter/lib/facter/util/cfpropertylist/lib/rbCFPropertyList.rb:110
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/util/cfpropertylist.rb:3
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/util/macosx.rb:10
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/macosx.rb:27
/Users/puppet/src/facter/lib/facter/util/loader.rb:95
/Users/puppet/src/facter/lib/facter/util/loader.rb:95
/Users/puppet/src/facter/lib/facter/util/loader.rb:46
/Users/puppet/src/facter/lib/facter/util/loader.rb:41
/Users/puppet/src/facter/lib/facter/util/loader.rb:41
/Users/puppet/src/facter/lib/facter/util/loader.rb:38
/Users/puppet/src/facter/lib/facter/util/loader.rb:38
/Users/puppet/src/facter/lib/facter/util/collection.rb:114
/Users/puppet/src/facter/lib/facter.rb:248
/Users/puppet/src/puppet/lib/puppet/application/resource.rb:9
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/application.rb:436
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/util.rb:513
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/util/command_line.rb:76
/Users/puppet/src/puppet/bin/puppet:10
</pre>

So I added 'NameError' to the list of errors caught by the rescue and tried 
again.  The good news is that THIS error goes away, but the bad news is that a 
REXML error bubbles up:

<pre>

Error: Could not initialize: superclass mismatch for class XML
/Users/puppet/src/facter/lib/facter/util/cfpropertylist/lib/rbREXMLParser.rb:7
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/util/cfpropertylist/lib/rbCFPropertyList.rb:120
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/util/cfpropertylist.rb:3
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/util/macosx.rb:10
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27
/Users/puppet/src/facter/lib/facter/macosx.rb:27
/Users/puppet/src/facter/lib/facter/util/loader.rb:95
/Users/puppet/src/facter/lib/facter/util/loader.rb:95
/Users/puppet/src/facter/lib/facter/util/loader.rb:46
/Users/puppet/src/facter/lib/facter/util/loader.rb:41
/Users/puppet/src/facter/lib/facter/util/loader.rb:41
/Users/puppet/src/facter/lib/facter/util/loader.rb:38
/Users/puppet/src/facter/lib/facter/util/loader.rb:38
/Users/puppet/src/facter/lib/facter/util/collection.rb:114
/Users/puppet/src/facter/lib/facter.rb:248
/Users/puppet/src/puppet/lib/puppet/application/resource.rb:9
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/application.rb:436
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/util.rb:513
/Users/puppet/src/puppet/lib/puppet/application.rb:338
/Users/puppet/src/puppet/lib/puppet/util/command_line.rb:76
/Users/puppet/src/puppet/bin/puppet:10
</pre>

This is probably a remnant of our custom namespacing of CFPropertyList under 
Facter::Util::
----------------------------------------
Bug #15990: Puppet fails due to facter error on 10.5.8 clients
https://projects.puppetlabs.com/issues/15990#change-70595

Author: Chris Barker
Status: Needs More Information
Priority: Normal
Assignee: Chris Barker
Category: 
Target version: 
Keywords: cfpropertylist xml plist parse
Branch: 
Affected Facter version: 2.0.0rc3


Running on ruby 1.8.6, it appears that CFPropertyList is not returning a proper 
plist, or is just full of null values.

Trace:

Error: Could not run: Could not retrieve facts for 10-5-8-pl-vm.local: 
undefined method `each' for nil:NilClass
/Users/puppet/src/facter/lib/facter/macosx.rb:30

The line is:
  Facter::Util::Macosx.hardware_overview.each do |fact, value|

Putting test code in place, it appears that around line 30/31 in 
facter/utils/macosx.rb the call to CFPropertList::List.new is returning nil 
values, so it might be a rexml issue in rbCFTypes

util/macosx.rb:
    plist = Facter::Util::CFPropertyList::List.new
    begin
      plist.load_str(xml)
    rescue => e
      fail("A plist file could not be properly read by 
Facter::Util::CFPropertyList: #{e.inspect}")
    end

The plist.load_str(xml) never appears to return.

I am working with Gary on this, so I will update as we dig into this more.


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to