Issue #15990 has been updated by Gary Larizza.

Here's what's failing on 10.5.8 for me:

<pre>
>> require 'facter'
=> true
>> require 'facter/util/macosx'
=> true
>> stuff = 
>> Facter::Util::Macosx.intern_xml(Facter::Util::Macosx.profiler_xml('SPHardwareDataType'))
RuntimeError: A plist file could not be properly read by 
Facter::Util::CFPropertyList: #<NameError: uninitialized constant 
LibXML::XML::Parser::Options>
        from /Users/glarizza/src/facter/lib/facter/util/macosx.rb:33:in 
`intern_xml'
        from (irb):7
</pre>

It's coming from self.intern_xml in facter/util/macosx.rb in these lines:

<pre>
plist = Facter::Util::CFPropertyList::List.new  # This succeeds
plist.load_str(xml)   # This throws an error about an uninitialized constant of 
LibXML::XML::Parser::Options
</pre>

Here's what I get when I try to run the code in IRB directly:

<pre>
>> plist = Facter::Util::CFPropertyList::List.new
=> #<Facter::Util::CFPropertyList::List:0x346d68 @data=nil, @format=0, 
@filename=nil>
>> plist.load_str(Facter::Util::Macosx.profiler_xml('SPHardwareDataType'))
NameError: uninitialized constant LibXML::XML::Parser::Options
        from 
/Users/glarizza/src/facter/lib/facter/util/cfpropertylist/lib/rbLibXMLParser.rb:16:in
 `load'
        from 
/Users/glarizza/src/facter/lib/facter/util/cfpropertylist/lib/rbCFPropertyList.rb:297:in
 `load_str'
        from (irb):12
</pre>

What's weird is that if I do a listing of the gems on the system, libxml is 
shown as being installed:

<pre>

bash-3.2# sudo gem list

*** LOCAL GEMS ***

actionmailer (1.3.6, 1.3.3)
actionpack (1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (1.15.6, 1.15.3)
activesupport (1.4.4, 1.4.2)
acts_as_ferret (0.4.1)
capistrano (2.0.0)
cgi_multipart_eof_fix (2.5.0, 2.2)
daemons (1.0.9, 1.0.7)
diff-lcs (1.1.3)
dnssd (0.6.0)
fastthread (1.0.1, 1.0)
fcgi (0.8.7)
ferret (0.11.4)
gem_plugin (0.2.3, 0.2.2)
highline (1.2.9)
hpricot (0.6)
libxml-ruby (0.9.5, 0.3.8.4)
metaclass (0.0.1)
mocha (0.12.3)
mongrel (1.1.4, 1.0.1)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
puppetlabs_spec_helper (0.2.0)
rails (1.2.6, 1.2.3)
rake (0.9.2.2, 0.7.3)
RedCloth (3.0.4)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.4)
ruby-openid (1.1.4)
ruby-yadis (0.3.4)
rubynode (0.1.3)
sources (0.0.1)
sqlite3-ruby (1.2.1)
termios (0.9.4)
<pre>

I also can't remove any of my gems, which is my own issue here:

<pre>
bash-3.2# sudo gem uninstall libxml-ruby
ERROR:  While executing gem ... (Gem::InstallError)
    cannot uninstall, check `gem list -d libxml-ruby`
</pre>

I'm going to try and replicate this on a fresh 10.5.8 VM, but thought I'd post 
my findings to help the cause. 
----------------------------------------
Bug #15990: Puppet fails due to facter error on 10.5.8 clients
https://projects.puppetlabs.com/issues/15990#change-70436

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