Issue #1838 has been reported by teyo.
----------------------------------------
Bug #1838: Facter fails with errors on VMware virtualized OS X server hosts.
http://projects.reductivelabs.com/issues/show/1838
Author: teyo
Status: Unreviewed
Priority: High
Assigned to: luke
Category:
Target version:
Complexity: Easy
Keywords: customer_reported
It seems facter won't run in virtual environment if the OS is Mac OS X. After
installing puppet and facter version 0.24.7 using gems and Mac packages, I
can't get facter to run. I get this error:
sh-3.2# facter
2008-12-22 11:58:06.223 system_profiler[6613:10b] Exception while calling
[SPPlatformReporter updateDictionary:]
*** -[NSCFArray objectAtIndex:]: index (3) beyond bounds (2)
/Library/Ruby/Site/1.8/facter/util/macosx.rb:29:in `hardware_overview':
undefined method `[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Site/1.8/facter/macosx.rb:28
from /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:72:in `load_file'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:38:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `each'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:33:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `each'
from /Library/Ruby/Site/1.8/facter/util/loader.rb:30:in `load_all'
from /Library/Ruby/Site/1.8/facter/util/collection.rb:90:in `load_all'
from /Library/Ruby/Site/1.8/facter.rb:91:in `to_hash'
from /usr/bin/facter:121
Nigel posted the following work around to the list.
# /usr/lib/ruby/site_ruby/1.8/facter/util/macosx.rb
def self.hardware_overview
# JJM Perhaps we should cache the XML data in a "class" level object.
top_level_plist = Plist::parse_xml %x{/usr/sbin/system_profiler -xml
SPHardwareDataType}
system_hardware = {}
begin
system_hardware = top_level_plist[0]['_items'][0]
system_hardware.delete '_name'
rescue
# do nothing
end
system_hardware
end
The failure is a result of this Vmware bug,
http://communities.vmware.com/message/1130391 but Facter should not fail if it
is unable to gather hardware information from the system profiler. Nigel's work
around addresses this issue.
----------------------------------------
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---