Issue #11609 has been updated by Malcolm Howe.
The problem arises because in facter/processor.rb processor_list_aix is a hash
unlike like processor_list which is an array. This is because in AIX the
processors are not necessarily numbered sequentially. So
$ lsdev -Cc processor
proc0 Available 00-00 Processor
proc2 Available 00-02 Processor
proc4 Available 00-04 Processor
proc6 Available 00-06 Processor
proc8 Available 00-08 Processor
proc10 Defined 00-10 Processor
$ lsattr -El proc0 -a type
type PowerPC_POWER6 Processor type False
$ facter | grep processor
processor0 => 0PowerPC_POWER6
processor1 => 6PowerPC_POWER6
processor2 => 2PowerPC_POWER6
processor3 => 8PowerPC_POWER6
processor4 => 4PowerPC_POWER6
processor5 => 10PowerPC_POWER6
processorcount => 6
But with the patch (based on facter 1.6.6)
95c95
< processor_list_aix.each_with_index do |desc, i|
---
> processor_list_aix.each do |i, desc|
We get the result
$ facter | grep processor
processor0 => PowerPC_POWER6
processor10 => PowerPC_POWER6
processor2 => PowerPC_POWER6
processor4 => PowerPC_POWER6
processor6 => PowerPC_POWER6
processor8 => PowerPC_POWER6
processorcount => 6
Of course this does raise the question of whether the facter facts should be
numbered according to the AIX processor numbering or sequentially but the use
of a hash in the first place suggests the intention was the former.
----------------------------------------
Bug #11609: aix facter show additional number ahead the cpu model
https://projects.puppetlabs.com/issues/11609#change-58975
Author: hongbo hu
Status: Investigating
Priority: Normal
Assignee:
Category: library
Target version:
Keywords: aix facter
Branch:
Affected Facter version: 1.6.4
processor0 => 0PowerPC_POWER6
--
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.