Issue #16527 has been updated by Alex Harvey.

The following may be a suitable solution:

    $ diff ./lib/facter/processor.rb.orig ./lib/facter/processor.rb
    171,172c171,177
    <     kstat = Facter::Util::Resolution.exec("/usr/bin/kstat cpu_info")
    <     kstat.scan(/\bcore_id\b\s+\d+/).uniq.length
    ---
    >     if %w(5.7 5.6 5.5.1).include? Facter.value(:kernelrelease)
    >       psrinfo = Facter::Util::Resolution.exec("/usr/sbin/psrinfo")
    >       psrinfo.lines.count
    >     else
    >       kstat = Facter::Util::Resolution.exec("/usr/bin/kstat cpu_info")
    >       kstat.scan(/\bcore_id\b\s+\d+/).uniq.length
    >     end

----------------------------------------
Bug #16527: 'kstat' command not available in Solaris 7 and earlier leading to 
failure in 'processorcount' fact
https://projects.puppetlabs.com/issues/16527#change-71496

Author: Alex Harvey
Status: Unreviewed
Priority: Normal
Assignee: Alex Harvey
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.12-rc2


The kstat command was not introduced until Solaris 8 leading to the following 
failure in Solaris 7 and earlier – 

    $ facter -d processorcount
    arp: -an: unknown host
    Not an EC2 host
    Could not retrieve processorcount: private method `scan' called for 
nil:NilClass
    value for processorcount is still nil

(The problem with arp -an is discussed in #16511).


-- 
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