Issue #11609 has been updated by Alex Harvey.
Jeff, this submitted code doesn't seem to work on my test system -
before your change -
<pre>
myhost[/]# facter -v
1.6.12
myhost[/]# facter |grep proc
processor0 => 0PowerPC_POWER7
processor1 => 4PowerPC_POWER7
processorcount => 2
</pre>
after -
<pre>
myhost[/]# cd
/opt/puppet/pup-puppet/lib/ruby/gems/1.8/gems/facter-1.6.12/lib/facter
myhost[facter]# cp -p processor.rb processor.rb.orig
myhost[facter]# cp -p util/processor.rb util/processor.rb.orig
myhost[facter]# mv /tmp/processor.rb.jeff processor.rb
myhost[facter]# mv /tmp/util_processor.rb.jeff util/processor.rb
myhost[facter]# facter |grep proc
processorcount => 0
</pre>
my test system -
<pre>
myhost[facter]# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [rs6000-aix]
myhost[facter]# uname -a
AIX myhost 1 6 00CEDB964C00
</pre>
The problem seems to be illustrated in the following code -
<pre>
$ cat /tmp/lsdev
proc0 Available 00-00 Processor
proc4 Available 00-04 Processor
proc8 Defined 00-08 Processor
proc12 Defined 00-12 Processor
</pre>
<pre>
$ cat test
#!/usr/local/bin/ruby
def self.lsdev
%x[cat /tmp/lsdev]
end
def self.aix_processor_list
aix_proc_id_list = []
if output = lsdev then
output.split("\n").each do |line|
#print line, "\n"
line.match(/proc\d+/) do |match|
# line.match doesn't appear to work as expected.
print "matched\n"
aix_proc_id_list << match[0]
end
end
end
aix_proc_id_list
end
aix_processor_list
</pre>
<pre>
$ ./test
$
</pre>
I've stumbled onto this while basing the fix for #11612 on your code.
----------------------------------------
Bug #11609: aix facter show additional number ahead the cpu model
https://projects.puppetlabs.com/issues/11609#change-74546
Author: hongbo hu
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Jeff McCune
Category: library
Target version: 1.6.x
Keywords: aix facter
Branch: https://github.com/puppetlabs/facter/pull/342
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.