Issue #11612 has been updated by Alex Harvey.
The problem may be what to do for people who have older HP-UX kit than is
supported at your site.
At my site we have eight different PA-RISC and six Itanium platforms.:) I am
not wedded to the solution I submitted, although it did handle the second
machinfo sample and with the patch handles both of your machinfo examples.
<pre>
diff --git a/lib/facter/util/processor.rb b/lib/facter/util/processor.rb
index 14c22dc..db258c3 100644
--- a/lib/facter/util/processor.rb
+++ b/lib/facter/util/processor.rb
@@ -87,6 +87,8 @@ module Processor
elsif line.match(/\d+\s+((?:PA-RISC|Intel).*processors.*)/) then
cpu = $1.to_s
cpu.sub!(/processors/, "processor")
+ elsif line.match(/\s+(Intel.*Processor.*)/) then
+ cpu = $1.to_s
end
end
end
diff --git a/spec/fixtures/hpux/machinfo/superdome-server-SD32B
b/spec/fixtures/hpux/machinfo/superdome-server-SD32B
new file mode 100644
index 0000000..14aefbe
--- /dev/null
+++ b/spec/fixtures/hpux/machinfo/superdome-server-SD32B
@@ -0,0 +1,53 @@
+CPU info:
+ Number of CPUs = 8
+ Number of enabled CPUs = 2
+ Number of enabled sockets = 2
+ Cores per socket = 2
+ Clock speed = 1598 MHz
+ Bus speed = 533 MT/s
+ CPUID registers
+ vendor information = "GenuineIntel"
+ processor serial number = 0x0000000000000000
+ processor version info = 0x0000000020000704
+ architecture revision: 0
+ processor family: 32 Intel(R) Itanium 2 9000 series
+ processor model: 1 Intel(R) Itanium 2 9000 series
+ Bus features
+ implemented = 0xbdf0000020000000
+ selected = 0x0020000000000000
+ Exclusive Bus Cache Line Replacement Enabled
+ processor revision: 7 Stepping C2
+ largest CPUID reg: 4
+ processor capabilities = 0x0000000000000005
+ implements long branch: 1
+ implements 16-byte atomic operations: 1
+
+Cache info (per core):
+ L1 Instruction: size = 16 KB, associativity = 4
+ L1 Data: size = 16 KB, associativity = 4
+ L2 Instruction: size = 1024 KB, associativity = 8
+ L2 Data: size = 256 KB, associativity = 8
+ L3 Unified: size = 12288 KB, associativity = 12
+
+Memory = 32700 MB (31.933594 GB)
+
+Firmware info:
+ Firmware revision = 9.66
+ FP SWA driver revision: 1.18
+ IPMI is supported on this system.
+ ERROR: Unable to obtain manageability firmware revision info.
+
+Platform info:
+ model string = "ia64 hp superdome server SD32B"
+ machine id number = STRING_WITH_DASHES
+ machine serial number = STRING
+
+OS info:
+ sysname = HP-UX
+ nodename = HOSTNAME
+ release = B.11.23
+ version = U (unlimited-user license)
+ machine = ia64
+ idnumber = NUMBER
+ vmunix _release_version:
+@(#) $Revision: vmunix: B11.23_LR FLAVOR=perf Fri Aug 29 22:35:38 PDT 2003 $
diff --git a/spec/fixtures/hpux/machinfo/superdome2-16s
b/spec/fixtures/hpux/machinfo/superdome2-16s
new file mode 100644
index 0000000..5652d19
--- /dev/null
+++ b/spec/fixtures/hpux/machinfo/superdome2-16s
@@ -0,0 +1,31 @@
+CPU info:
+ Intel(R) Itanium(R) Processor 9340 (1.6 GHz, 15 MB)
+ 4 cores, 8 logical processors per socket
+ 4.79 GT/s QPI, CPU version E0
+ Active processor count:
+ 2 sockets
+ 6 cores (3 per socket)
+ 12 logical processors (6 per socket)
+ LCPU attribute is enabled
+
+Memory: 14332 MB (14 GB)
+
+Firmware info:
+ Firmware revision: 004.044.000
+ FP SWA driver revision: 1.18
+ IPMI is supported on this system.
+ BMC firmware revision: 2.53
+
+Platform info:
+ Model: "ia64 hp Superdome2 16s"
+ Machine ID number: STRING_WITH_DASHES
+ Machine serial number: STRING
+
+OS info:
+ Nodename: HOSTNAME
+ Release: HP-UX B.11.31
+ Version: U (unlimited-user license)
+ Machine: ia64
+ ID Number: NUMBER
+ vmunix _release_version:
+@(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf
diff --git a/spec/unit/processor_spec.rb b/spec/unit/processor_spec.rb
index f97958a..8887815 100755
--- a/spec/unit/processor_spec.rb
+++ b/spec/unit/processor_spec.rb
@@ -317,6 +317,8 @@ describe "processorX facts" do
examples << [File.read(fixtures('hpux','machinfo','ia64-rx6600')),
"Intel(R) Itanium 2 9100 series processor (1.59 GHz, 18 MB)"]
examples << [File.read(fixtures('hpux','machinfo','ia64-rx8640')),
"Intel(R) Itanium 2 9100 series"]
examples << [File.read(fixtures('hpux','machinfo','hppa-rp4440')),
"PA-RISC 8800 processor (1000 MHz, 64 MB)"]
+ examples <<
[File.read(fixtures('hpux','machinfo','superdome-server-SD32B')), "Intel(R)
Itanium 2 9000 series"]
+ examples << [File.read(fixtures('hpux','machinfo','superdome2-16s')),
"Intel(R) Itanium(R) Processor 9340 (1.6 GHz, 15 MB)"]
examples
end
</pre>
I still, personally, would maintain that it's not a suitable solution to use
getconf if we have to update the code each time HP releases a new hardware
model.
Do you have any other machinfo examples you think the code might not handle?
----------------------------------------
Bug #11612: add facter support for ia 11.31 hpux processor discover and a bug
fix for network interface
https://projects.puppetlabs.com/issues/11612#change-76779
Author: hongbo hu
Status: Merged - Pending Release
Priority: Normal
Assignee:
Category: library
Target version: 1.6.15
Keywords: facter hpux
Branch: https://github.com/puppetlabs/facter/pull/232
Affected Facter version:
1. add cpu information support to facter support HPUX 11.31 IA64
2. when server has mc-sg the network card has standby lan card marked
with '*' ,when run faster ,it'll show ifconfig no such interface error
pull requre at github
https://github.com/puppetlabs/facter/pull/127
I'll add more feature for hp and aix
--
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.