Issue #2945 has been updated by Paul Nasrat.

Target version changed from 1.5.8 to 1.6.0

I've spent some time reading up on the cpuinfo interface and through the arm 
kernel code around this and it is very arch specific. Moving to sysfs based 
enumeration is probably the right thing to do for linux but is probably too big 
for 1.5.8, so bumping bug to 1.6.0.


----------------------------------------
Bug #2945: Processorcount is zero
http://projects.reductivelabs.com/issues/2945

Author: John Axel Eriksson
Status: Needs more information
Priority: Normal
Assigned to: 
Category: library
Target version: 1.6.0
Keywords: 
Branch: 


I'm running puppet on a "computer plug" system. Its small, got 512 megs of ram 
and 512 megs ssd and an arm processor. If I do cat /proc/cpuinfo I get:

Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1192.75
Features        : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell SheevaPlug Reference Board
Is sheeva
Revision        : 0000
Serial          : 0000000000000000


In facter I get:

physicalprocessorcount => 0
processorcount => 0

which is of course not true.

I did a temporary but ugly fix for my purposes in lib/facter/processor.rb like 
this:

File.readlines("/proc/cpuinfo").each do |l|
            if l =~ /processor\s+:\s+(\d+)/
                processor_num = $1.to_i
            elsif l =~ /model name\s+:\s+(.*)\s*$/
                processor_list[processor_num] = $1 unless processor_num == -1
                processor_num = -1
            elsif l =~ /Hardware\s+:\s+Marvell\sSheevaPlug\s.*$/
                processor_num = 1
            end
        end

the last elsif is added and simply checks for the Marvell SheevaPlug line and 
sets processor_num to 1.
I don't know if this will work in the long run and it sure is ugly.

Perhaps its reasonable to assume that all systems have at least one processor? 
Or is that a stupid assumption?


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

Reply via email to