Issue #15990 has been updated by Gary Larizza.

Keywords set to cfpropertylist xml plist parse

Some more information around this.  CFPropertyList attempts to use one of three 
libraries to parse plists in this order:

* libxml-ruby
* nokogiri
* REXML (built-in support)

The 10.5 machine I'm testing on has neither libxml-ruby (which needs the c 
libraries, and since I don't have developer tools installed then libxml-ruby 
won't install) nor Nokogiri (Nokogiri requires ruby 1.8.7 or >, and 10.5 comes 
with 1.8.6).  That leaves the built-in REXML support.

<pre>
bash-3.2# ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
</pre>

Now, we went to CFPropertyList due to the fact that it would be faster for 
parsing plists and that it would also natively handle binary plists (something 
that facter/util/plist cannot do).  The speed increase for Facter was NOT that 
big (since Facter only parses a single plist) and binary isn't YET the case 
(since system profiler still outputs an XML plist, which facter/util/plist can 
read).  If we're having issues with CFPropertyList, I think we need to re-visit 
supporting it initially in Facter.  I'm going to see if I can track down 
exactly where this error is coming from, but I can confirm that I have issues 
in 10.5 with Facter 2.0.0 and CFPropertyList.
----------------------------------------
Bug #15990: Puppet fails due to facter error on 10.5.8 clients
https://projects.puppetlabs.com/issues/15990#change-70434

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