Issue #2945 has been updated by John Axel Eriksson.

Here's the output:


jae:~# find /sys/devices/system/cpu/
/sys/devices/system/cpu/
/sys/devices/system/cpu/online
/sys/devices/system/cpu/possible
/sys/devices/system/cpu/present
/sys/devices/system/cpu/kernel_max
/sys/devices/system/cpu/offline
/sys/devices/system/cpu/cpuidle
/sys/devices/system/cpu/cpuidle/current_driver
/sys/devices/system/cpu/cpuidle/current_governor_ro
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0/crash_notes
/sys/devices/system/cpu/cpu0/cpuidle
/sys/devices/system/cpu/cpu0/cpuidle/state0
/sys/devices/system/cpu/cpu0/cpuidle/state0/name
/sys/devices/system/cpu/cpu0/cpuidle/state0/desc
/sys/devices/system/cpu/cpu0/cpuidle/state0/latency
/sys/devices/system/cpu/cpu0/cpuidle/state0/power
/sys/devices/system/cpu/cpu0/cpuidle/state0/usage
/sys/devices/system/cpu/cpu0/cpuidle/state0/time
/sys/devices/system/cpu/cpu0/cpuidle/state1
/sys/devices/system/cpu/cpu0/cpuidle/state1/name
/sys/devices/system/cpu/cpu0/cpuidle/state1/desc
/sys/devices/system/cpu/cpu0/cpuidle/state1/latency
/sys/devices/system/cpu/cpu0/cpuidle/state1/power
/sys/devices/system/cpu/cpu0/cpuidle/state1/usage
/sys/devices/system/cpu/cpu0/cpuidle/state1/time

------------------------------------------

jae:~# find /sys/class/cpuid
find: `/sys/class/cpuid': No such file or directory

------------------------------------------

jae:~# cat /proc/cpuinfo 
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
Revision        : 0000
Serial          : 0000000000000000

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